Is it possible to split a class definition?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jerry.levan@gmail.com

    #1

    Is it possible to split a class definition?

    Hi,

    Is it possible to split a Class definition over two or more text files?
    (if so, how:)

    Jerry

  • Lawrence Oluyede

    #2
    Re: Is it possible to split a class definition?

    <jerry.levan@gm ail.com> wrote:
    [color=blue]
    > Is it possible to split a Class definition over two or more text files?
    > (if so, how:)[/color]

    There's no partial types like in .NET 2.0 but since Python is dynamic
    you can add members at runtime :-)

    --
    Lawrence - http://www.oluyede.org/blog
    "Nothing is more dangerous than an idea
    if it's the only one you have" - E. A. Chartier

    Comment

    • Diez B. Roggisch

      #3
      Re: Is it possible to split a class definition?

      jerry.levan@gma il.com schrieb:[color=blue]
      > Hi,
      >
      > Is it possible to split a Class definition over two or more text files?
      > (if so, how:)[/color]


      Not in that sense. But if you must, you can use several classes and then
      a resulting class that inherits from all of these.

      Diez

      Comment

      • Bruno Desthuilliers

        #4
        Re: Is it possible to split a class definition?

        jerry.levan@gma il.com wrote:[color=blue]
        > Hi,
        >
        > Is it possible to split a Class definition over two or more text files?[/color]

        Yes, but not directly. Could you tell us why you think you have such a
        need ?
        [color=blue]
        > (if so, how:)[/color]

        Please answer my previous question first !-)

        --
        bruno desthuilliers
        python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
        p in 'onurb@xiludom. gro'.split('@')])"

        Comment

        Working...