[Python-ideas] PEP 3155 - Qualified name for classes and functions
Antoine Pitrou
solipsis at pitrou.net
Mon Oct 31 16:50:03 CET 2011
On Mon, 31 Oct 2011 16:42:00 +0100
Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:
> On Sun, Oct 30, 2011 at 00:18, Antoine Pitrou <solipsis at pitrou.net> wrote:
> > I would like to propose the following PEP for discussion and, if
> > possible, acceptance. I think the proposal shouldn't be too
> > controversial (I find it quite simple and straightforward myself :-)).
>
> Are these names relative or fully absolute? I.e. I've had problems in
> the past with unpickling objects that were pickled from a module that
> was imported using a relative import. Would it be possible to define
> the qname such that the full path to the name, starting from a
> sys.path level down, is always used?
The __qname__, by design, doesn't include any module name. To get the
"full path", you still have to add in the __module__ attribute.
Solving the problems with relative imports (I'm not sure what they are)
is another problem which Nick is apparently tackling (?).
Regards
Antoine.
More information about the Python-ideas
mailing list