[Patches] [ python-Patches-404997 ] Alternative to __future__ imports

nobody nobody@sourceforge.net
Wed, 28 Feb 2001 22:06:29 -0800


Patches #404997, was updated on 2001-02-28 13:57
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=404997&group_id=5470

Category: Parser/Compiler
Group: None
Status: Open
Priority: 5
Submitted By: Martin v. Löwis
Assigned to: Nobody/Anonymous
Summary: Alternative to __future__ imports

Initial Comment:
This patch adds an alternative notation for selecting
nested scopes on the module level, by means of a 

directive nested_scopes

declaration. This is a declaration, and it may only
appear at the "beginning" of a module. Even though it
adds a keyword "directive", this is only a keyword if
it appears as the first keyword in the file; as a
result, 

def directive():
  directive = 1

is still accepted (even without warning, but that could
be changed if desired).

The patch currently only accepts the directives that
are also __future__ imports, although it can be
extended to allow other things, e.g.

directive source_encoding "latin-1"

This is possible since the syntax allows an optional
atom after the directive's name.

----------------------------------------------------------------------

Comment By: Martin v. Löwis
Date: 2001-02-28 22:06

Message:
Logged In: YES 
user_id=21627

Retry uploading the patch

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=404997&group_id=5470