On Tue, Aug 16, 2011 at 9:23 PM, Antoine Pitrou <solipsis at pitrou.net> wrote: > On Tue, 16 Aug 2011 20:15:51 +1000 > Nick Coghlan <ncoghlan at gmail.com> wrote: >> > >> > Oops, I admit I hadn't read PEP 395. >> > PEP 395 focuses on module aliasing, while the suggestion above focuses >> > on the path of objects in modules. How can we reconcile the two? Do we >> > want __qualname__ to be a relative "path" inside the module? >> > (but then __qualname__ cannot specify its own module name). >> >> I was more thinking that if pickle grew the ability to handle two >> different names for objects, then PEP 395 could run off the same >> feature without having to mess with sys.modules. > > But what happens if a module contains, say, a nested class with a > __qualname__ (assigned by the interpreter) of "module_name.A.B", and the > module later gets a __qualname__ (assigned by the user) of > "module_alias"? Yeah, I don't think it works with PEP 395 in its current state. But then, I'm not sure 395 will work at all in its current state - definitely a work in progress, that one. However, I'll definitely keep this aspect in mind next time I update it - even if they don't use the same mechanism, they should at least be compatible proposals. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
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