[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-patches
Subject:    [Patches] [ python-Patches-404997 ] Alternative to __future__ imports
From:       nobody () sourceforge ! net (nobody)
Date:       2001-02-28 21:57:24
Message-ID: E14YEb6-00046d-00 () usw-sf-web1 ! sourceforge ! net
[Download RAW message or body]

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.

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic