[Python-Dev] New Future Keywords

Thomas Wouters thomas at python.org
Mon Mar 6 00:39:26 CET 2006

On 3/6/06, Thomas Lee <krumms at gmail.com> wrote:

> Just a quick question: how can I add new future keywords to Python? I
> need to add a new (Python) keyword to the language, but there seems to
> be a few different source files that I need to modify.
> Just want to make sure I'm doing it the right way before I go unleashing
> a nasty broken patch into the world :)

I wouldn't bother with a future statement until your patch has a chance of
being included in Python. Adding one later is just as easy as adding one
now, and you have a good chance of getting someone else to do it for you.
That's what Guido did with the with-statement patch; he got Neal to do it
for him ;) But if you really want to do it yourself, I would suggest
grokking the with-statement future-import patch I checked in last week
(written mostly by Neal Norwitz, with inspiration stolen from Michael
Hudson's patch):

svn diff -r42666:42667 http://svn.python.org/projects/python/trunk

Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20060306/7356e9cb/attachment.htm 

More information about the Python-Dev mailing list