On Tue, 16 Dec 2003, Guido van Rossum wrote: > There is the remaining issue of what exactly the syntax would be. I > propose to extend the from clause to allow one or more dots before the > dotted name, and to make the dotted name optional if at least one > leading dot is found. I propose not to change from-less import. > Examples: > > from .foo import bar > from .foo.bar import xxx > from . import foobar as barfoo > from ..foo.bar import * > from ... import foobar, barfoo > > Grammar change (see Grammar/Grammar): > > dotted_name: NAME ('.' NAME)* | '.'+ [NAME ('.' NAME)*] On a related and minor note, can we please expand the grammar to allow from...import statements to continue to the next line after a trailing comma? For those of us with large, complex, and componentized projects, it would be very nice. e.g.: from OPAL.Modules.Financial.Reports.COGS import generate, webOptions, normalize, row_ops, summary instead of: from OPAL.Modules.Financial.Reports.COGS import generate, webOptions, \ normalize, row_ops, \ summary This has been a minor nit that bothers just under the threshold of fixing it myself. ;) Thanks, -Kevin -- -- Kevin Jacobs The OPAL Group - Enterprise Systems Architect Voice: (440) 871-6725 x 19 E-mail: jacobs at theopalgroup.com Fax: (440) 871-6722 WWW: http://www.theopalgroup.com/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4