Alias for an attribute defined in a superclass
ben+python at benfinney.id.au
Fri Apr 1 02:57:18 CEST 2011
Calvin Spealman <ironfroggy at gmail.com> writes:
> Sounds like you're just going to end up with more confusing code
> having multiple ways to refer to the exact same thing. Why?
(Why did you top-post?)
I'm defining aliases to conform to an existing API. The “Foo” class's
attributes are what is needed, but not by the right names. So I'm making
a subclass “Bar” to provide those same attributes by the names required
by the third-party API.
\ “He that loveth father or mother more than me is not worthy of |
`\ me: and he that loveth son or daughter more than me is not |
_o__) worthy of me.” —Jesus, as quoted in Matthew 10:37 |
More information about the Python-list