Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #2324
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Alias for an attribute defined in a superclass |
| References | <87sju3ndjo.fsf@benfinney.id.au> <mailman.57.1301618196.2990.python-list@python.org> |
| Date | 2011-04-01 11:57 +1100 |
| Message-ID | <87d3l6okk1.fsf@benfinney.id.au> (permalink) |
| Organization | Unlimited download news at news.astraweb.com |
Calvin Spealman <ironfroggy@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 | Ben Finney
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Alias for an attribute defined in a superclass Ben Finney <ben+python@benfinney.id.au> - 2011-04-01 09:14 +1100
Re: Alias for an attribute defined in a superclass Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-01 00:14 +0000
Re: Alias for an attribute defined in a superclass Ben Finney <ben+python@benfinney.id.au> - 2011-04-01 11:59 +1100
Re: Alias for an attribute defined in a superclass Calvin Spealman <ironfroggy@gmail.com> - 2011-03-31 20:36 -0400
Re: Alias for an attribute defined in a superclass Ben Finney <ben+python@benfinney.id.au> - 2011-04-01 11:57 +1100
Re: Alias for an attribute defined in a superclass Raymond Hettinger <python@rcn.com> - 2011-03-31 19:24 -0700
Re: Alias for an attribute defined in a superclass Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-04-01 11:54 +0200
csiph-web