predefined empty base class ??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • iwl

    #1

    predefined empty base class ??

    Hi,

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

  • Diez B. Roggisch

    #2
    Re: predefined empty base class ??

    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

    Comment

    • robert

      #3
      Re: predefined empty base class ??

      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



      RFE SF #1637926


      Robert

      Comment

      • robert

        #4
        Re: predefined empty base class ??

        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
        >

        >
        RFE SF #1637926
        >

        ( and x=Exception();x .a=1 will do it preliminary )


        Robert

        Comment

        • Gabriel Genellina

          #5
          Re: predefined empty base class ??

          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(objec t):
          >... pass
          Do you want a one liner?

          class EmptyBase(objec t): 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!


          Comment

          • robert

            #6
            Re: predefined empty base class ??

            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(objec t):
            >... pass
            >
            Do you want a one liner?
            >
            class EmptyBase(objec t): pass
            >
            :)
            Isn't "predefined " a zero liner :-;

            Comment

            Working...