dalejung / pandas-composition

Pandas Composition/Inheritance
MIT License
9 stars 0 forks source link

Making the wrapping/delegation logic more sane #14

Open dalejung opened 11 years ago

dalejung commented 11 years ago

Currently the only methods that I wrap in during the metaclass class generation are the magic methods. I wonder if this should be expanded to all methods.

If that's the case, then would the __getattribute__ and _wrap ever get called?

Currently _wrap creates a new Method for each instance since it is doing it on the fly.

The only reason I could see in not pre-wrapping all pandas methods is that the UserFrame.dict would be huge. though it's already pretty big.

Actualy, I should add an intermediary class before UserFrame/UserSeries that only contains the wrapped functions. Then UserFrame.dict would only contain the UserFrame specific methods...