Re: Not fully OO ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Colin J. Williams

    Re: Not fully OO ?

    candide wrote:
    Excerpt quoted from http://www.astro.ufl.edu/~warner/prog/python.html :
    >
    "About Python: Python is a high level scripting language with object
    oriented features.
    (...)
    Python supports OOP and classes to an extent, but is not a full OOP
    language."
    >
    >
    Thanks for any comment.
    "foreach: for x in array: statements
    Loops over the array given by array. On
    each iteration, the value of the current
    element is assigned to x and the
    internal array pointer is advanced by one. "

    This could be a useful addition to Python.

    numarray is no longer supported. It has
    been supplanted by numpy.

    How is OOP defined?

    Colin W.
  • Fredrik Lundh

    #2
    Re: Not fully OO ?

    Colin J. Williams wrote:
    "foreach: for x in array: statements
    >
    Loops over the array given by array. On each iteration, the value of the
    current element is assigned to x and the internal array pointer is
    advanced by one. "
    >
    This could be a useful addition to Python.
    for-in could be a useful addition to Python? looks like Guido's used
    his time machine again, then, since it's been around since the pre-1.0 days:

    The official home of the Python Programming Language


    </F>

    Comment

    • =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

      #3
      Re: Not fully OO ?

      for-in could be a useful addition to Python? looks like Guido's used
      his time machine again, then, since it's been around since the pre-1.0
      days:
      >
      http://www.python.org/doc/ref/for.html
      He somehow must have misinterpreted



      which has the exact text he quoted. Unfortunately, this text has
      foreach in bold, so he might have assumed foreach to be a keyword
      (despite the example to the right demonstrating the contrary).

      What this has to do with OO, or with numpy, is beyond me.

      Regards,
      Martin

      Comment

      • Colin J. Williams

        #4
        Re: Not fully OO ?

        Fredrik Lundh wrote:
        Colin J. Williams wrote:
        >
        >"foreach: for x in array: statements
        >>
        >Loops over the array given by array. On each iteration, the value of
        >the current element is assigned to x and the internal array pointer is
        >advanced by one. "
        >>
        >This could be a useful addition to Python.
        >
        for-in could be a useful addition to Python? looks like Guido's used
        his time machine again, then, since it's been around since the pre-1.0
        days:
        >
        The official home of the Python Programming Language

        >
        </F>
        >
        Thanks.

        for_stmt ::= "for" target_list "in"
        expression_list ":" suite
        ["else" ":" suite]

        Colin W.

        Comment

        Working...