By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,235 Members | 1,022 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,235 IT Pros & Developers. It's quick & easy.

predefined empty base class ??

P: n/a
iwl
Hi,

is there an predefined empty base class
which I can instanziate to have an
container i can copy attributes in?

Jan 17 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
is there an predefined empty base class
which I can instanziate to have an
container i can copy attributes in?
No, but you can always do

class Foo(object):
pass

foo = Foo()

foo.attribute = value

Diez
Jan 17 '07 #2

P: n/a
iwl wrote:
Hi,

is there an predefined empty base class
which I can instanziate to have an
container i can copy attributes in?
you are not the only one missing such class

http://groups.google.com/group/comp....f946e7da13dba9

RFE SF #1637926
Robert
Jan 17 '07 #3

P: n/a
robert wrote:
iwl wrote:
>Hi,

is there an predefined empty base class
which I can instanziate to have an container i can copy attributes in?

you are not the only one missing such class

http://groups.google.com/group/comp....f946e7da13dba9

RFE SF #1637926

( and x=Exception();x.a=1 will do it preliminary )
Robert
Jan 17 '07 #4

P: n/a
At Wednesday 17/1/2007 15:34, Dennis Lee Bieber wrote:
is there an predefined empty base class
which I can instanziate to have an
container i can copy attributes in?

I think that's a two-liner...
>class EmptyBase(object):
... pass
Do you want a one liner?

class EmptyBase(object): pass

:)
--
Gabriel Genellina
Softlab SRL


__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

Jan 17 '07 #5

P: n/a
Gabriel Genellina wrote:
At Wednesday 17/1/2007 15:34, Dennis Lee Bieber wrote:
is there an predefined empty base class
which I can instanziate to have an
container i can copy attributes in?

I think that's a two-liner...
>>class EmptyBase(object):
... pass

Do you want a one liner?

class EmptyBase(object): pass

:)
Isn't "predefined" a zero liner :-;
Jan 18 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.