Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6019 > unrolled thread
| Started by | sunrrrise <sunrrrise@gmail.com> |
|---|---|
| First post | 2011-05-22 15:59 -0700 |
| Last post | 2011-05-23 09:21 +1000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
Odp: Re: Strange behaviour of input() function (Python 3.2) sunrrrise <sunrrrise@gmail.com> - 2011-05-22 15:59 -0700
Re: Re: Strange behaviour of input() function (Python 3.2) Chris Angelico <rosuav@gmail.com> - 2011-05-23 09:21 +1000
| From | sunrrrise <sunrrrise@gmail.com> |
|---|---|
| Date | 2011-05-22 15:59 -0700 |
| Subject | Odp: Re: Strange behaviour of input() function (Python 3.2) |
| Message-ID | <724378fc-9848-406f-9b44-165132c49a56@glegroupsg2000goo.googlegroups.com> |
Thank you for quick response!
English is not my native language so I'm going to keep my explanations simple.
This really simple script asks me for two variables called "a" and "b". For example, I type "4" for "a" and "3" for "b" and IDLE gives me that:
Wprowadz zmienna a: 4
Wprowadz zmienna b: 3
a to: 4
b to: 3
7
Works fine!
But when I'm using Notepad (or Komodo) I get this:
Wprowadz zmienna a: 4
Wprowadz zmienna b: 3
Traceback (most recent call last):
File "c:\users\sunrrrise\Desktop\test.py", line 7, in <module>
print(int(a) + int(b))
ValueError: invalid literal for int() with base 10: 'Wprowadz zmienna b: 3'
a to: 4
b to: Wprowadz zmienna b: 3
This is exactly the same script from the same file. I really don't get it.
[toc] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-05-23 09:21 +1000 |
| Subject | Re: Re: Strange behaviour of input() function (Python 3.2) |
| Message-ID | <mailman.1940.1306106491.9059.python-list@python.org> |
| In reply to | #6019 |
On Mon, May 23, 2011 at 8:59 AM, sunrrrise <sunrrrise@gmail.com> wrote: > Thank you for quick response! > > English is not my native language so I'm going to keep my explanations simple. No problem, your English is far better than my Polish. (I used Google Translate to figure out what "Wprowadz zmienna" means.) I tried copying and pasting your exact code, even down to using Notepad, but it worked fine. The interpreter I used was a freshly-downloaded Python 3.2, listing itself as r32:88445 dated Feb 20 2011, 21:29:03. This may be a really specific bug. Can you email me the actual Python file you're having problems with, please? Off-list, as this list doesn't like attachments. I'll try running it on my system and see if it's any different. Chris Angelico
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web