while c = f.read(1)
Mon Aug 22 11:48:24 CEST 2005
"Greg McIntyre" <greg at puyo.cjb.net> writes:
> while c = f.read(1):
> # ...
> I couldn't find any general PEPs along these lines, only specific ones
> (e.g. 308 re. an if-then-else expression).
I often end up doing something like this:
def set(self, x):
self.x = x
c = foo()
# do stuff with c.x
In that file example, it's too much nuisance, but when you're
comparing some input against a series of regexps and you'd otherwise
need a multi-line construction for each one, this method comes in
More information about the Python-list