[Python-checkins] python/nondist/peps pep-0328.txt,1.2,1.3

goodger at users.sourceforge.net goodger at users.sourceforge.net
Sat Apr 3 10:02:49 EST 2004


Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16111
Modified Files:
	pep-0328.txt 
Log Message:
update from Aahz
Index: pep-0328.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0328.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pep-0328.txt	31 Jan 2004 05:19:25 -0000	1.2
--- pep-0328.txt	3 Apr 2004 15:02:46 -0000	1.3
***************
*** 3,13 ****
 Version: $Revision$
 Last-Modified: $Date$
! Author: Aahz <aahz at pythoncraft.com
! Status: Draft
 Type: Standards Track
 Python-Version: 2.4
 Content-Type: text/x-rst
 Created: 21-Dec-2003
! Post-History: 
 
 
--- 3,13 ----
 Version: $Revision$
 Last-Modified: $Date$
! Author: Aahz <aahz at pythoncraft.com>
! Status: Accepted
 Type: Standards Track
 Python-Version: 2.4
 Content-Type: text/x-rst
 Created: 21-Dec-2003
! Post-History: 8-Mar-2004
 
 
***************
*** 40,45 ****
 * Write a long line with backslash continuations::
 
! from Tkinter import Tk, Frame, Button, Entry, Canvas, Text \
! LEFT, DISABLED, NORMAL, RIDGE, END
 
 * Write multiple ``import`` statements::
--- 40,45 ----
 * Write a long line with backslash continuations::
 
! from Tkinter import Tk, Frame, Button, Entry, Canvas, Text, \
! LEFT, DISABLED, NORMAL, RIDGE, END
 
 * Write multiple ``import`` statements::
***************
*** 53,57 ****
 mechanism (parentheses) to write the ``import`` statement::
 
! from Tkinter import (Tk, Frame, Button, Entry, Canvas, Text
 LEFT, DISABLED, NORMAL, RIDGE, END)
 
--- 53,57 ----
 mechanism (parentheses) to write the ``import`` statement::
 
! from Tkinter import (Tk, Frame, Button, Entry, Canvas, Text,
 LEFT, DISABLED, NORMAL, RIDGE, END)
 
***************
*** 102,110 ****
 * One from Guido::
 
! from .foo import
 
 and ::
 
! from ...foo import
 
 These two forms have a couple of different suggested semantics. One
--- 102,110 ----
 * One from Guido::
 
! from .foo import bar
 
 and ::
 
! from ...foo import bar
 
 These two forms have a couple of different suggested semantics. One
***************
*** 119,122 ****
--- 119,129 ----
 parent gets hit".)
 
+ Some people have suggested other punctuation as the separator, such
+ as "-" or "^".
+ 
+ Some people have suggested using "*"::
+ 
+ from *.foo import bar
+ 
 * The next set of options is conflated from several posters::
 
***************
*** 131,134 ****
--- 138,161 ----
 shorter option.
 
+ * One suggestion was to allow only sibling references. In other words,
+ you would not be able to use relative imports to refer to modules
+ higher in the package tree. You would then be able to do either ::
+ 
+ from .spam import eggs
+ 
+ or ::
+ 
+ import .spam.eggs
+ 
+ * Some people favor allowing indexed parents::
+ 
+ from -2.spam import eggs
+ 
+ In this scenario, importing from the current directory would be a
+ simple ::
+ 
+ from .spam import eggs
+ 
+ 
 * Finally, some people dislike the way you have to change ``import``
 to ``from ... import`` when you want to dig inside a package. They
***************
*** 161,170 ****
 
 
! Open Issues
! ===========
 
! The BDFL needs to decide which of the various options for relative
! imports works best. Additional proposals are still welcome. As
! usual, Guido prefers reasons to histrionics.
 
 
--- 188,196 ----
 
 
! Guido's Decision
! ================
 
! Guido has Pronounced [1]_ that relative imports will use leading dots,
! one per level of parent.
 
 
***************
*** 186,189 ****
--- 212,217 ----
 <http://mail.python.org/pipermail/python-dev/2003-December/041418.html>`__
 
+ .. [1] http://mail.python.org/pipermail/python-dev/2004-March/043739.html
+ 
 
 Copyright


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /