Learning Python Quotes

Rate this book
Clear rating
Learning Python Learning Python by Mark Lutz
3,191 ratings, 4.01 average rating, 177 reviews
Open Preview
Learning Python Quotes Showing 91-120 of 114
“map is similar to a list comprehension but is more limited because it requires a function instead of an arbitrary expression.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“absolutes in performance benchmarks are as elusive as consensus in open source projects!”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“As usual in programming, if something is difficult for you to understand, it’s probably not a good idea.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“Moreover, depending on your Python and code, list comprehensions might run much faster than manual for loop statements (often roughly twice as fast) because their iterations are performed at C language speed inside the interpreter, rather than with manual Python code.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“We met the list comprehension briefly in Chapter 4. Syntactically, its syntax is derived from a construct in set theory notation that applies an operation to each item in a set, but you don’t have to know set theory to use this tool.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“__next__ raises a built-in StopIteration exception at end-of-file”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“The name used as the assignment target in a for header line is usually a (possibly new) variable in the scope where the for statement is coded. There’s not much unique about this name; it can even be changed inside the loop’s body, but it will automatically be set to the next item in the sequence when control returns to the top of the loop again.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“In general terms, the loop else simply provides explicit syntax for a common coding scenario — it is a coding structure that lets us catch the “other” way out of a loop, without setting and checking flags or conditions.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“Boolean and and or operators return a true or false object in Python, not the values True or False.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“and indent all but the simplest of blocks.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“when in Pythonland, do as Pythonistas do, not as C programmers do.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“This description requires elaboration when the value and the slice being assigned overlap: L[2:5]=L[3:6], for instance, works fine because the value to be inserted is fetched before the deletion happens on the left.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“In Python, practicality often beats aesthetics.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“a raw string cannot end in an odd number of backslashes.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“Besides directory paths on Windows, raw strings are also commonly used for regular expressions”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“pdb also includes a postmortem function (pdb.pm()) that you can run after an exception occurs, to get information from the time of the error. See”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“you can do everything in Python that you can in Perl, but”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“give people a tool, and they’ll code for a day; teach them how to build tools, and they’ll code for a lifetime. This”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“In the Python way of thinking, explicit is better than implicit, and simple is better than complex.1”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“Because writing teaches writers to write, this”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“Because teaching teaches teachers to teach, this”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“When people write software, they are not writing it for themselves. In fact, they are not even writing primarily for the computer. Rather, good programmers know that code is written for the next human being who has to read it in order to maintain or reuse it. If that person cannot understand the code, it’s all but useless in a realistic development scenario.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“freedom of expression is great for art, but lousy for engineering.”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming
“As an educator, I’ve sometimes found the rate of change in Python and its libraries to be a negative, and have on occasion lamented its growth over the years. This is partly because trainers and book authors live on the front lines of such things — it’s been my job to teach the language despite its constant change, a task at times akin to chronicling the herding of cats!”
Mark Lutz, Learning Python: Powerful Object-Oriented Programming

1 2 4 next »