Re: Partial 1.0 - Partial classes for Python

Discussion in 'Python' started by J. Clifford Dyer, Feb 8, 2007.

  1. 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 class over several modules. One location serves
    > as the original definition of the class.
    >
    > To extend a class original_module.FullClass with
    > an additional function, one writes
    >
    > from partial import *
    > import original_module
    >


    Erm,

    Please don't use 'from x import *', especially in a demo example like
    this. It makes it less clear which variables below come from your module.

    Thanks,
    Cliff

    > class ExtendedClass(partial, original_module.FullClass):
    > def additional_method(self, args):
    > body
    > more_methods
    >
    > This module is licensed under the Academic Free License v3.0.
    >
    > Please send comments and feedback to
    J. Clifford Dyer, Feb 8, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VmFkaW0=?=

    Is there a way to sign partial classes in Whidbey?

    =?Utf-8?B?VmFkaW0=?=, Jan 12, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    579
    Juan T. Llibre
    Jan 13, 2005
  2. C.Batt
    Replies:
    6
    Views:
    1,995
    Brock Allen
    May 2, 2005
  3. =?Utf-8?B?UGF0cmljaw==?=

    ASP.Net 2.0 and partial classes

    =?Utf-8?B?UGF0cmljaw==?=, Apr 25, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    2,702
    clintonG
    Apr 26, 2005
  4. Billy
    Replies:
    2
    Views:
    490
    Billy
    Feb 1, 2006
  5. Thomas Heller
    Replies:
    13
    Views:
    842
    Michele Simionato
    Feb 8, 2007
Loading...

Share This Page