Dannnno / Chemistry

Simulation of organic chemistry reactions has been moved here
https://github.com/PyCAOS/CAOS
Other
16 stars 7 forks source link

Add Element.bondedto attribute #4

Closed Dannnno closed 9 years ago

Dannnno commented 9 years ago

Currently if I want to get things that my element is bonded to I have to do something like

second = filter(lambda x: x.get_other(other).name == "Carbon", other.bonds)[0].get_other(other)

That's awful. I'd much rather do

second = filter(lambda x: x.name == "Carbon", other.bondedto)[0]

Dannnno commented 9 years ago

Will be resolved in upcoming client rewrite