"Samuele Pedroni" <pedronis@bluewin.ch> writes: > From: "Jeff Epler" <jepler@unpythonic.net> > >> Currently __all__ is a list of all the attributes to be exported by the >> module. What if we let __all__ be a list (with its current >> interpretation) or a callable. <snip> > I find this idea of a semantics change rather unpythonic; Of course you do; look at Jeff's email address! Wish I'd thought of establishing that one myself <wink>. Calling something "un-pythonic" is a very convenient form of derision. But seriously: it's not a semantics change, but an extension... unless you think people are making __all__ callable today, and counting on an exception from the import mechanism. > ( 2nd in general should not import * be avoided ?) > > Why then only import * should have a user-defined behavior? > > What about > > from module import x I had the same thoughts. I am not entirely convinced that what my user has asked for is the best approach. > if the importing module has already a defined x then maybe that > should be also under user control? I don't understand that suggestion. Care to elaborate? > I'm surely missing something. it ain't neccessarily so... -- David Abrahams dave@boost-consulting.com * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
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