FAQ
Hey guys,i am a python newbie,
i just read a qustion on quora where it said that quora quys used pypy (and pylon) to develop quora.

So, i want to know what are the core diff btw PyPy and Python ?

And they also talked about the lack of type check in python.

So, how does it help (strongly typed) in debugging?

Thanks

Search Discussions

  • Anthony Kong at Jul 13, 2011 at 2:19 pm
    One of the main difference is that pypy supports only R-Python, which stands
    for 'Restricted Python".

    It is a subset of C-python language.

    See here for more info:
    http://codespeak.net/pypy/dist/pypy/doc/coding-guide.html#rpython-definition-not

    Cheers
    On Thu, Jul 14, 2011 at 12:06 AM, ArrC wrote:

    Hey guys,i am a python newbie,
    i just read a qustion on quora where it said that quora quys used pypy (and
    pylon) to develop quora.

    So, i want to know what are the core diff btw PyPy and Python ?

    And they also talked about the lack of type check in python.

    So, how does it help (strongly typed) in debugging?

    Thanks
    --
    http://mail.python.org/mailman/listinfo/python-list


    --

    Tony Kong
    *blog:* www.ahwkong.com

    Don?t EVER make the mistake that you can design something better than what
    you get from ruthless massively parallel trial-and-error with a feedback
    cycle. That?s giving your intelligence *much* too much credit.


    - Linus Torvalds
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20110714/58c1245a/attachment.html>
  • Ian Kelly at Jul 13, 2011 at 3:18 pm

    On Wed, Jul 13, 2011 at 8:19 AM, Anthony Kong wrote:
    One of the main difference is that pypy supports only R-Python, which stands
    for 'Restricted Python".
    It is a subset of C-python language.
    This is wrong. The PyPy *interpreter* is written in RPython. At the
    application level, PyPy supports the full syntax and semantics of
    Python (with a few minor differences of the same sort that you find in
    Jython or IronPython).
  • Anthony Kong at Jul 13, 2011 at 3:54 pm
    I stand corrected. Thanks Ian

    Cheers
    On Thu, Jul 14, 2011 at 1:18 AM, Ian Kelly wrote:
    On Wed, Jul 13, 2011 at 8:19 AM, Anthony Kong wrote:
    One of the main difference is that pypy supports only R-Python, which stands
    for 'Restricted Python".
    It is a subset of C-python language.
    This is wrong. The PyPy *interpreter* is written in RPython. At the
    application level, PyPy supports the full syntax and semantics of
    Python (with a few minor differences of the same sort that you find in
    Jython or IronPython).


    --

    Tony Kong
    *blog:* www.ahwkong.com

    Don?t EVER make the mistake that you can design something better than what
    you get from ruthless massively parallel trial-and-error with a feedback
    cycle. That?s giving your intelligence *much* too much credit.


    - Linus Torvalds
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20110714/e5d34df5/attachment.html>
  • Dan Stromberg at Jul 13, 2011 at 4:22 pm

    On Wed, Jul 13, 2011 at 8:18 AM, Ian Kelly wrote:
    On Wed, Jul 13, 2011 at 8:19 AM, Anthony Kong wrote:
    One of the main difference is that pypy supports only R-Python, which stands
    for 'Restricted Python".
    It is a subset of C-python language.
    This is wrong. The PyPy *interpreter* is written in RPython. At the
    application level, PyPy supports the full syntax and semantics of
    Python (with a few minor differences of the same sort that you find in
    Jython or IronPython).
    PyPy (2.7) and Jython (2.5) are pretty close to each other, though PyPy is
    quite a bit faster than Jython or CPython. Both PyPy and Jython are good
    implementations of the Python language, at least if you don't need a lot of
    C extension modules.

    IronPython doesn't appear to have a standard library. :( Or rather, it can
    use a CPython install's standard library, but a significant fraction of it
    doesn't work on IronPython - it doesn't appear to have been tested or
    adapted. There's something called FePy that includes IronPython and a
    better standard library, but AFAIK, it only works on windows.
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20110713/ab8e0878/attachment.html>
  • Terry Reedy at Jul 13, 2011 at 4:31 pm

    On 7/13/2011 10:19 AM, Anthony Kong wrote:
    One of the main difference is that pypy supports only R-Python, which
    stands for 'Restricted Python".
    Not true. PyPy is *written* in rpython. It runs standard Python.

    --
    Terry Jan Reedy
  • Chris Angelico at Jul 13, 2011 at 2:21 pm

    On Thu, Jul 14, 2011 at 12:06 AM, ArrC wrote:
    So, i want to know what are the core diff btw PyPy and Python ?
    Python is a language; PyPy is one implementation of that language. The
    "classic" implementation of Python is CPython, not to be confused with
    Cython; there are a few others as well. If you talk of "installing
    Python", it probably means CPython.
    And they also talked about the lack of type check in python.

    So, how does it help (strongly typed) in debugging?
    Sloppy but brief explanation: Python's variables are typeless; its
    objects are strongly typed.

    Longer explanation: Every piece of data in Python is an object.
    Objects can be referenced by names; one object can have more than one
    name pointing to it. Any name can point to any value, which is
    somewhat the opposite of "strongly-typed variables" in other
    languages. For instance:

    a = "Hello" # a points to or "holds" a string
    a = 234 # a now points to an integer
    a = 1.0 # a now points to a float
    a = [1,2,3] # a now has a list (array)

    In debugging, all you generally care about is "what does this object
    point to". I guess whether or not this makes things easier or harder
    depends a lot on what sort of bugs you're tracking down.

    Hope that helps!

    Chris Angelico
  • ArrC at Jul 13, 2011 at 2:49 pm
    Thanks Chris,
    That was a nice brief explanation,but i got the point.
  • Sturlamolden at Jul 13, 2011 at 3:03 pm

    On 13 Jul, 16:06, ArrC wrote:

    And they also talked about the lack of type check in python.

    So, how does it help (strongly typed) in debugging?

    Python is strongly typed. There are no static type checks in Python.
    Type checks are done at runtime. Dynamic typing does not mean that
    Python is a weakly typed language.

    The question of debugging is often raised, particularly by Java heads:

    In Python, the "doctest" and "unittest" modules can be used to verify
    that code works according to specification (e.g. trap type errors),
    and are common alternatives to static type checks.

    http://docs.python.org/release/3.2/library/doctest.html
    http://docs.python.org/release/3.2/library/unittest.html

    It is a good practice to always write tests for your code.

    Python 3.x also has function argument and return value type
    annotations, which is a further guard against type errors:

    http://www.python.org/dev/peps/pep-3107/


    Sturla

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJul 13, '11 at 2:06p
activeJul 13, '11 at 4:31p
posts9
users7
websitepython.org

People

Translate

site design / logo © 2022 Grokbase