Call for signatories for J2
Michael Sparks
michaels at rd.bbc.co.uk
Thu Aug 26 12:21:44 EDT 2004
> Robert Brewer wrote:
> ...
>> The patch is nearly complete;
>
> Patch against current CVS passes all the tests* and has been uploaded
> to SourceForge. I'm currently looking at how __future__ declarations
> work.
Patch against current CVS including __future__ statements/declarations
has now been created, tested and uploaded to SourceForge. All tests
pass.
For those interested this means the full patch now allows:
----------------------
from __future__ import decorators
def memoise(f):
"dummy memoisation function"
return f
class Foo:
using:
staticmethod
memoise
def Hoo(Who, *args):
print "Yoo", Who
Foo.Hoo("HOO")
----------------------
For the __future__ work I followed the approach taken by
generators/yield in 2.2 . Using decorators without an explicit
import from __future__ results in a failure.
On a slightly different topic, when I was looking at how __future__
statments work, I must admit when I saw the following, it made me
smile:
> python
Python 2.3.3 (#1, Apr 6 2004, 01:47:39)
[GCC 3.3.3 (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import braces
File "<stdin>", line 1
SyntaxError: not a chance
>>>
Digging around the python source I must admit has been a pleasurable
experience (especially when finding nuggets like this! :). Whether or
not syntax J2 gets accepted or not, this has been fun - my compliments
to the python-dev team :)
Regards,
Michael.
--
Michael.Sparks at rd.bbc.co.uk
British Broadcasting Corporation, Research and Development
Kingswood Warren, Surrey KT20 6NP
This message (and any attachments) may contain personal views
which are not the views of the BBC unless specifically stated.
More information about the Python-list
mailing list