Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44226
| References | <4e46cc04-248e-4594-a24a-b272648a5e66@googlegroups.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2013-04-23 16:22 -0600 |
| Subject | Re: What is the reason for defining classes within classes in Python? |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1001.1366755826.3114.python-list@python.org> (permalink) |
On Tue, Apr 23, 2013 at 3:50 PM, vasudevram <vasudevram@gmail.com> wrote: > > Hi list, > > I saw an example of defining a class within another class, here, in the docs for peewee, a simple ORM for Python: > > http://peewee.readthedocs.org/en/latest/peewee/quickstart.html > > In what way is this useful? In that particular case they're just using it as a namespace. Django does the same thing.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What is the reason for defining classes within classes in Python? vasudevram <vasudevram@gmail.com> - 2013-04-23 14:50 -0700
Re: What is the reason for defining classes within classes in Python? Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-23 16:22 -0600
Re: What is the reason for defining classes within classes in Python? vasudevram <vasudevram@gmail.com> - 2013-04-23 16:13 -0700
Re: What is the reason for defining classes within classes in Python? alex23 <wuwei23@gmail.com> - 2013-04-23 17:50 -0700
Re: What is the reason for defining classes within classes in Python? vasudevram <vasudevram@gmail.com> - 2013-04-24 04:01 -0700
Re: What is the reason for defining classes within classes in Python? Peter Otten <__peter__@web.de> - 2013-04-24 14:00 +0200
Re: What is the reason for defining classes within classes in Python? vasudevram <vasudevram@gmail.com> - 2013-04-24 06:29 -0700
csiph-web