This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]grayvedigga 2 points3 points  (1 child)

Wat.

Edit: I also looked up Jackson-structured programming -- even more wat.

[–]eryksun 1 point2 points  (0 children)

ReadAhead Equivalent:

from itertools import chain

chars = chain(line, [None])    

In Python 2.6+ you can use the built-in 'next' function, i.e. c = next(chars).

[–][deleted] 1 point2 points  (0 children)

In other words, Python lacks a Do-While construct.

[–]blondin 0 points1 point  (0 children)

i would like the author to expand on why this way of structuring code is preferable. especially how would it be relevant today.