Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9396 > unrolled thread
| Started by | ArrC <justmailnaveen@gmail.com> |
|---|---|
| First post | 2011-07-13 07:06 -0700 |
| Last post | 2011-07-13 12:31 -0400 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.python
What is the difference between PyPy and Python? are there lot of differences? ArrC <justmailnaveen@gmail.com> - 2011-07-13 07:06 -0700
Re: What is the difference between PyPy and Python? are there lot of differences? Chris Angelico <rosuav@gmail.com> - 2011-07-14 00:21 +1000
Re: What is the difference between PyPy and Python? are there lot of differences? sturlamolden <sturlamolden@yahoo.no> - 2011-07-13 08:03 -0700
Re: What is the difference between PyPy and Python? are there lot of differences? Ian Kelly <ian.g.kelly@gmail.com> - 2011-07-13 09:18 -0600
Re: What is the difference between PyPy and Python? are there lot of differences? Terry Reedy <tjreedy@udel.edu> - 2011-07-13 12:31 -0400
| From | ArrC <justmailnaveen@gmail.com> |
|---|---|
| Date | 2011-07-13 07:06 -0700 |
| Subject | What is the difference between PyPy and Python? are there lot of differences? |
| Message-ID | <bf9cd288-c187-402f-b444-b605a2a91572@glegroupsg2000goo.googlegroups.com> |
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
[toc] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-07-14 00:21 +1000 |
| Message-ID | <mailman.981.1310566877.1164.python-list@python.org> |
| In reply to | #9396 |
On Thu, Jul 14, 2011 at 12:06 AM, ArrC <justmailnaveen@gmail.com> 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
[toc] | [prev] | [next] | [standalone]
| From | sturlamolden <sturlamolden@yahoo.no> |
|---|---|
| Date | 2011-07-13 08:03 -0700 |
| Message-ID | <4a7a95d5-e2b6-4c4c-8093-fd33203b7990@a11g2000yqm.googlegroups.com> |
| In reply to | #9396 |
On 13 Jul, 16:06, ArrC <justmailnav...@gmail.com> 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
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2011-07-13 09:18 -0600 |
| Message-ID | <mailman.988.1310570378.1164.python-list@python.org> |
| In reply to | #9396 |
On Wed, Jul 13, 2011 at 8:19 AM, Anthony Kong <anthony.hw.kong@gmail.com> 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).
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2011-07-13 12:31 -0400 |
| Message-ID | <mailman.997.1310574908.1164.python-list@python.org> |
| In reply to | #9396 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web