Hi there, join Readernaut

Readernaut is the easiest way to share what you're reading with friends.

Join now!

"... there many be an unlimited number of stages in a program" should read "there may be an unlimited number of stages in a program"

Like the overview of regular expressions so far.

677

  • Skylar read 77 pages.

what do those backticks mean?

<_habnabit> skyl, hahaha, that's quite a few problems in one line of code.

<_habnabit> skyl, backticks are an ancient, super-deprecated alias for repr()

kill them with fire

hrm, this is from Chun's Core Python Programming, Second Edition page 592

skyl: kill it with fire

skyl: is it from 1996?

skyl: seriously, that's been deprecated since forever. Don't use it unless you're trying to confuse whoever reads your code, just call repr(self.__data)

reprinted with corrections June 2008

skyl: weird book then

<_habnabit> skyl, what mzz said, except it should be return repr(self._data)

<_habnabit> skyl, __name is dumb.

_habnabit: I was getting to that :)

skyl: I'm hoping the book does mention what __ actually does?

skyl: that is: name mangling?

<_habnabit> I really doubt it.

  • mzz is being optimistic

right, it talks about name mangling

skyl: most ...

600

  • Skylar read 117 pages.

242

  • Skylar read 242 pages.

.. code-block:: pycon

  >>> print 'I wonder if reST syntax highlighting happens here'

Just wanted to note that the chapter on functional programming got me excited about the topic again. Functional programming is fun. Reading about python's features almost made me want to jump back into Haskell.

I feel like I've always had a good intuitive understanding of scope and namespaces in Python but Look forward to the explanation here.

These things in Python have always been self-explanatory/what-you-would-expect.

483

  • Skylar read 112 pages.

I just hit an exception in my work that it does not seem that I can try/except ...

"don't use string exceptions, only objects that are instances of BaseException (or one of its subclasses)"

http://codepad.org/9lPuAXmp

anyhoo..

I'm much more interested in Errors and exceptions.

I love Chun's core note on propagation of the exceptions.

I got through Files and Input/Output which frankly is not that interesting b/c I rarely interact with the filesystem (relational databases and webservices and stuff). Glad to have the chapter under my belt though.

371

  • Skylar read 66 pages.

I like the perspective into other languages like C.

I've been deep in the Python for loop for a while. I was just the other day thinking of what would be proper in Python in a ternary operator. Now I know some of the history behind it re:PEP308:

 >>> smaller = (x<y and [x] or [y])[0]

And, better yet, what I thought it was when I was trying to think of it out on the porch the other day:

 >>> smaller = x if x<y else y

That's good clean python.

Must be the 4th-5th time I've thought-over/read_about shallow copying vs deep copying but I remember a nice explanation here.

sequence type operators, built-in function and methods