from __future__ import generators
Joal Heagney
s713221 at student.gu.edu.au
Fri Aug 10 06:43:45 EDT 2001
Guido van Rossum wrote:
>
> "gzeljko" <gzeljko at sezampro.yu> writes:
>
> > I just installed 2.2a1 and immediately come to
> > 'natural question':
> >
> > Is 'from __future__ import generators' really
> > necessary ?
>
> If enough people prefer to always have the 'yield' keyword enabled, we
> can do that. I thought that there would be a huge opposition against
> breaking code this way, but maybe it's OK. At least 'yield' is not a
> silent break.
>
> --Guido van Rossum (home page: http://www.python.org/~guido/)
Well as a quick test, I went through my entire python1.5 install
(because it's the oldest python code I've got lying around :) grepping
for "yield" and only found the following references.
In the main library directory:
macpath.py:# The result (s, t) is such that join(s, t) yields the
original argument.
mhlib.py:# The tostring() function yields a string that can be passed to
another
whrandom.py:# whrandom.random() yields double precision random
numbers
In PIL
OleFileIO.py: value = None # everything else yields "None"
Only four uses of yield, and all in a documenting comment where
occurance of keywords won't matter anycase. In addition to PIL, I've got
packages for Tkinter, pygnome, pygtk, modulator, idle, pyglade and
pynche installed, but perhaps a more intensive user of python should
check their files as well?
--
Joal Heagney is: _____ _____
/\ _ __ __ _ | | _ ___ |
/__\|\ || ||__ |\ || |___|/_\|___] |
/ \ \_||__ ||___| \_|! | | \ \ !
More information about the Python-list
mailing list