On Thu, 2007-01-11 at 08:41 -0600, Chris Mellon wrote:
On 11 Jan 2007 15:01:48 +0100, Neil Cerutti [EMAIL PROTECTED] wrote:
On 2007-01-11, Frederic Rentsch [EMAIL PROTECTED] wrote:
If I derive a class from another one because I need a few extra
features, is there a way to promote the base
On 1/24/07, Cliff Wells [EMAIL PROTECTED] wrote:
On Thu, 2007-01-11 at 08:41 -0600, Chris Mellon wrote:
On 11 Jan 2007 15:01:48 +0100, Neil Cerutti [EMAIL PROTECTED] wrote:
On 2007-01-11, Frederic Rentsch [EMAIL PROTECTED] wrote:
If I derive a class from another one because I need a few
On Wed, 2007-01-24 at 12:57 -0600, Chris Mellon wrote:
In Python, you can do this simply by re-assigning the __class__. I'm
not convinced that your type system makes sense, here though. Any
reasonable ORM should be able to persist and reload an object without
losing the type information.
On Wed, 2007-01-24 at 11:37 -0800, Cliff Wells wrote:
class Person: # assume this is something from the ORM
name = Kenny
class PersonRow ( Person ):
pass
def flatten_person ( p ):
return spanomg, you've killed %p/span % p.name
def flatten_personrow ( p ):
return
On 1/24/07, Cliff Wells [EMAIL PROTECTED] wrote:
On Wed, 2007-01-24 at 12:57 -0600, Chris Mellon wrote:
In Python, you can do this simply by re-assigning the __class__. I'm
not convinced that your type system makes sense, here though. Any
reasonable ORM should be able to persist and
Chris Mellon wrote:
On 11 Jan 2007 15:01:48 +0100, Neil Cerutti [EMAIL PROTECTED] wrote:
On 2007-01-11, Frederic Rentsch [EMAIL PROTECTED] wrote:
If I derive a class from another one because I need a few extra
features, is there a way to promote the base class to the
derived one
Hi all,
If I derive a class from another one because I need a few extra
features, is there a way to promote the base class to the derived one
without having to make copies of all attributes?
class Derived (Base):
def __init__ (self, base_object):
# ( copy all attributes )
...
Frederic Rentsch:
If I derive a class from another one because I need a few extra
features, is there a way to promote the base class to the derived one
without having to make copies of all attributes?
class Derived (Base):
def __init__ (self, base_object):
# ( copy all
Frederic Rentsch wrote:
If I derive a class from another one because I need a few extra
features, is there a way to promote the base class to the derived one
without having to make copies of all attributes?
class Derived (Base):
def __init__ (self, base_object):
# ( copy all
On 2007-01-11, Frederic Rentsch [EMAIL PROTECTED] wrote:
If I derive a class from another one because I need a few extra
features, is there a way to promote the base class to the
derived one without having to make copies of all attributes?
class Derived (Base):
def __init__ (self,
Peter Otten [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Frederic Rentsch wrote:
If I derive a class from another one because I need a few extra
features, is there a way to promote the base class to the derived one
without having to make copies of all attributes?
class
On 11 Jan 2007 15:01:48 +0100, Neil Cerutti [EMAIL PROTECTED] wrote:
On 2007-01-11, Frederic Rentsch [EMAIL PROTECTED] wrote:
If I derive a class from another one because I need a few extra
features, is there a way to promote the base class to the
derived one without having to make copies
12 matches
Mail list logo