← Back to team overview

yade-users team mailing list archive

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

 



Yade [1]: s=utils.sphere([0,0,0],1)
Yade [2]: s.shape.name
Use pure python way,
s.shape.__class__.__name__, we don't need yade specific hack for that
anymore.


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?


--
Best regards,
Sergei D.



Follow ups

References