← Back to team overview

yade-users team mailing list archive

Re: AttributeError: 'Sphere' object has no attribute 'name'

 

> Sorry, Vaclav, but in my opinion, this syntax looks horrible for users. 
> s.shape.name looks much better. In addition, __foo__ is syntax for 
> protected members, not for the users interface. No?
I think the idea is that __ names are for attributes that are "metadata"
for the objects. Well, do you need often to test type name? You can say
s.__class__==Sphere (it should be also faster), since Sphere is a real
python class now. Is that better?

Cheers, v.




Follow ups

References