__dict__ attribute for built-in types

candide candide at free.invalid
Thu Oct 27 22:46:17 EDT 2011


Le 28/10/2011 02:02, MRAB a écrit :

>
> No, built-in classes written in C have certain limitations, but why
> would you want to do that anyway?




Mainly for learning purpose and Python better understanding.

Actually, I have a class of mine for drawing graphs with the Graphviz 
software. The nodes of the graph to be represented was supposed to have 
2 attributes, say title and shortName. Now, I want to plot a graph whose 
nodes are pure string. So to fit the class interface, I was trying to 
add title and shortName attribute to every string node.




More information about the Python-list mailing list