Samuele Pedroni wrote:
[...]
this should approximate that behavior better: [not tested]
import sys
def __new__(cls, name, bases, dic):
sub = [x for x in dic.values() if isinstance(x,HierarchMeta)]
newtype = type.__new__(cls, name, bases, dic)
for x in sub:
if not ha
Walter Dörwald wrote:
Samuele Pedroni wrote:
[...]
And having the full name of the class available would certainly help
in debugging.
that's probably the only plus point but the names would be confusing wrt
modules vs. classes.
You'd propably need a different separator in repr. XIST does this:
Samuele Pedroni wrote:
[...]
And having the full name of the class available would certainly help
in debugging.
that's probably the only plus point but the names would be confusing wrt
modules vs. classes.
You'd propably need a different separator in repr. XIST does this:
>>> from ll.xist.ns impo
Walter Dörwald wrote:
Samuele Pedroni wrote:
Walter Dörwald wrote:
[User cases for pickling instances of nested classes]
So is this change wanted? useful? implementable with reasonable
effort? Or
just not worth it?
notice that in this cases often metaclasses are involved or could
easely be, so i
Samuele Pedroni wrote:
Walter Dörwald wrote:
[User cases for pickling instances of nested classes]
So is this change wanted? useful? implementable with reasonable
effort? Or
just not worth it?
notice that in this cases often metaclasses are involved or could easely
be, so if pickling would honor
Martin v. Löwis wrote:
Walter Dörwald wrote:
So is this change wanted? useful? implementable with reasonable
effort? Or
just not worth it?
I think it is just not worth it. This means I won't attempt to implement
it. I think I defined originally the __module__ attribute for classes to
support bette
Walter Dörwald wrote:
For XML: 1) Those classes are the element types and the nested classes
are the attributes. 2) Being able to define those attributes as separate
classes makes it possible to implement custom functionality (e.g. for
validation or for handling certain attribute types like URLs, c
Walter Dörwald wrote:
So is this change wanted? useful? implementable with reasonable effort? Or
just not worth it?
I think it is just not worth it. This means I won't attempt to implement
it. I think I defined originally the __module__ attribute for classes to
support better pickling (and defined