Re: Partial 1.0 - Partial classes for Python

2007-02-08 Thread Michele Simionato
On Feb 8, 8:15 pm, Thomas Heller <[EMAIL PROTECTED]> wrote: > I agree with most of the posters is this thread that it is confusing to spread > the definition of a class over several places or files. > > But, there are cases where the trick come in handy - when classes are created > not by class sta

Re: Partial 1.0 - Partial classes for Python

2007-02-08 Thread Thomas Heller
Ziga Seilnacht schrieb: > Thomas Heller wrote: >> >> Do you have a pointer to that post? >> > > I think that he was refering to this post: > http://mail.python.org/pipermail/python-list/2006-December/416241.html > > If you are interested in various implementations there is also this: > http://mai

Re: Partial 1.0 - Partial classes for Python

2007-02-08 Thread J. Clifford Dyer
Martin v. Löwis wrote: > I'm happy to announce partial 1.0; a module to implement > partial classes in Python. It is available from > > http://cheeseshop.python.org/pypi/partial/1.0 > > A partial class is a fragment of a class definition; > partial classes allow to spread the definition of > a cl

Re: Partial 1.0 - Partial classes for Python

2007-02-08 Thread Michele Simionato
On Feb 8, 4:05 pm, [EMAIL PROTECTED] wrote:> > Composition is great when you know how largish classes are going to be > composed ahead of time and/or already have the pieces available in the form > of other classes you want to reuse. I use this fragment-by-multiple- > inheritance (I hesitate to ca

Re: Partial 1.0 - Partial classes for Python

2007-02-08 Thread skip
Michele> That is a common design, but I don't like it, since it becomes Michele> very easy to get classes with dozens of methods inherited from Michele> everywhere, a modern incarnation of the spaghetti-code Michele> concept. I find it much better to use composition, i.e. to Mi

Re: Partial 1.0 - Partial classes for Python

2007-02-08 Thread Michele Simionato
On Feb 8, 1:04 pm, [EMAIL PROTECTED] wrote: > greg> When I want to do this, usually I define the parts as ordinary, > greg> separate classes, and then define the main class as inheriting > greg> from all of them. > > Agreed. Maybe it's just my feeble brain, but I find this the most > c

Re: Partial 1.0 - Partial classes for Python

2007-02-08 Thread skip
greg> When I want to do this, usually I define the parts as ordinary, greg> separate classes, and then define the main class as inheriting greg> from all of them. Agreed. Maybe it's just my feeble brain, but I find this the most compelling (and easy to understand) use for multiple in

Re: Partial 1.0 - Partial classes for Python

2007-02-07 Thread greg
> Martin v. Löwis schrieb: > >>A partial class is a fragment of a class definition; >>partial classes allow to spread the definition of >>a class over several modules. When I want to do this, usually I define the parts as ordinary, separate classes, and then define the main class as inheriting fr

Re: Partial 1.0 - Partial classes for Python

2007-02-07 Thread Ziga Seilnacht
Thomas Heller wrote: > > Do you have a pointer to that post? > I think that he was refering to this post: http://mail.python.org/pipermail/python-list/2006-December/416241.html If you are interested in various implementations there is also this: http://mail.python.org/pipermail/python-list/2006-A

Re: Partial 1.0 - Partial classes for Python

2007-02-07 Thread Thomas Heller
Carl Banks schrieb: > On Feb 7, 10:17 am, "Carl Banks" <[EMAIL PROTECTED]> wrote: >> On Feb 7, 8:51 am, Thomas Heller <[EMAIL PROTECTED]> wrote: >> >> >> >> > Martin v. Löwis schrieb: >> >> > > I'm happy to announce partial 1.0; a module to implement >> > > partial classes in Python. It is availabl

Re: Partial 1.0 - Partial classes for Python

2007-02-07 Thread Carl Banks
On Feb 7, 10:48 am, "Michele Simionato" <[EMAIL PROTECTED]> wrote: > > Martin v. Löwis schrieb: > > > > I'm happy to announce partial 1.0; a module to implement > > > partial classes in Python. It is available from > > > >http://cheeseshop.python.org/pypi/partial/1.0 > > > > A partial class is a fr

Re: Partial 1.0 - Partial classes for Python

2007-02-07 Thread Michele Simionato
> Martin v. Löwis schrieb: > > > > > I'm happy to announce partial 1.0; a module to implement > > partial classes in Python. It is available from > > >http://cheeseshop.python.org/pypi/partial/1.0 > > > A partial class is a fragment of a class definition; > > partial classes allow to spread the def

Re: Partial 1.0 - Partial classes for Python

2007-02-07 Thread Carl Banks
On Feb 7, 10:17 am, "Carl Banks" <[EMAIL PROTECTED]> wrote: > On Feb 7, 8:51 am, Thomas Heller <[EMAIL PROTECTED]> wrote: > > > > > Martin v. Löwis schrieb: > > > > I'm happy to announce partial 1.0; a module to implement > > > partial classes in Python. It is available from > > > >http://cheesesho

Re: Partial 1.0 - Partial classes for Python

2007-02-07 Thread Carl Banks
On Feb 7, 8:51 am, Thomas Heller <[EMAIL PROTECTED]> wrote: > Martin v. Löwis schrieb: > > > I'm happy to announce partial 1.0; a module to implement > > partial classes in Python. It is available from > > >http://cheeseshop.python.org/pypi/partial/1.0 > > > A partial class is a fragment of a class

Re: Partial 1.0 - Partial classes for Python

2007-02-07 Thread Thomas Heller
Martin v. Löwis schrieb: > I'm happy to announce partial 1.0; a module to implement > partial classes in Python. It is available from > > http://cheeseshop.python.org/pypi/partial/1.0 > > A partial class is a fragment of a class definition; > partial classes allow to spread the definition of > a