__dict__ attribute for built-in types

candide candide at free.invalid
Fri Oct 28 06:04:14 EDT 2011


Le 28/10/2011 05:02, Patrick Maupin a écrit :
> You can easily do that by subclassing a string:
>> class AnnotatedStr(str):
> pass
>> x = AnnotatedStr('Node1')
> x.title = 'Title for node 1'
>
Less or more what I did. But requires to transport the string graph 
structure to the AnnotatedStr one.


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /