enthought / traits-enaml

A library to facilitate interoperation of Traits with Enaml > 0.8.x
Other
15 stars 11 forks source link

redundant operators in custom enamldefs #7

Closed sccolbert closed 10 years ago

sccolbert commented 11 years ago

This pattern:

value << getattr(model, trait_desc.name)
value :: setattr(model, trait_desc.name, self.value)

is equivalent to this:

value := getattr(model, trait_desc.name)

The standard inverter will invert getattr to setattr automatically. Just fyi.

jwiggins commented 11 years ago

Thanks. That'll save a bit of code.

itziakos commented 11 years ago

I am reopening this issue until #9 is merged into master, as soon as the testing framework is setup.

jwiggins commented 11 years ago

Just merge #9, it's trivial.

itziakos commented 11 years ago

9 has waited for three months a few more days will not make a big difference.