Hey!
Try to use like this: http://sprunge.us/RcYb
change values for understanding code.
Good ideas guys!
---
Jayme Proni Filho
Skype: jaymeproni
Twitter: @jaymeproni
Phone: +55 - 17 - 3631 - 6576
Mobile: +55 - 1
Westley Martínez wrote:
> On Fri, Apr 22, 2011 at 10:08:20AM -0400, Mel wrote:
[ ... ]
>> But sys.exit() doesn't return a string. My fave is
>>
>> Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
>> [GCC 4.4.3] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>
Chris Rebert wrote:
Well, it pretty much*was* totally removed; it was prone to misuse and
had very few legitimate uses. It's just that raw_input() also got
renamed simultaneously.
What were you using it for? There are often much better alternatives.
For the purpose pretty much described in PEP
On Fri, Apr 22, 2011 at 10:08:20AM -0400, Mel wrote:
> Westley Martínez wrote:
> > On Fri, Apr 22, 2011 at 04:49:19PM +1000, Chris Angelico wrote:
>
> >> U NO. NO NO NO. What if someone enters "os.exit()" as their
> >> number? You shouldn't eval() unchecked user input!
> >>
> >> Chris Ang
On Sat, Apr 23, 2011 at 9:55 AM, Steven D'Aprano
wrote:
> On Sat, 23 Apr 2011 06:25:51 +1000, Chris Angelico wrote:
>
>> On Sat, Apr 23, 2011 at 12:08 AM, Mel wrote:
>>> But sys.exit() doesn't return a string. My fave is
>>
>> It doesn't return _at all_. Boom, process terminated.
>
>
> Technical
On Sat, 23 Apr 2011 06:25:51 +1000, Chris Angelico wrote:
> On Sat, Apr 23, 2011 at 12:08 AM, Mel wrote:
>> But sys.exit() doesn't return a string. My fave is
>
> It doesn't return _at all_. Boom, process terminated.
Technically it raises an exception, which can then be caught by the usual
e
On Sat, Apr 23, 2011 at 12:08 AM, Mel wrote:
> But sys.exit() doesn't return a string. My fave is
It doesn't return _at all_. Boom, process terminated.
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 22, 2011 10:12 AM, "Mel" wrote:
>
> Westley Martínez wrote:
> > On Fri, Apr 22, 2011 at 04:49:19PM +1000, Chris Angelico wrote:
>
> >> U NO. NO NO NO. What if someone enters "os.exit()" as their
> >> number? You shouldn't eval() unchecked user input!
> >>
> >> Chris Angelico
> >
> >
Westley Martínez wrote:
> On Fri, Apr 22, 2011 at 04:49:19PM +1000, Chris Angelico wrote:
>> U NO. NO NO NO. What if someone enters "os.exit()" as their
>> number? You shouldn't eval() unchecked user input!
>>
>> Chris Angelico
>
> Right, there's no way to check you're getting a number,
On Fri, Apr 22, 2011 at 04:49:19PM +1000, Chris Angelico wrote:
> On Fri, Apr 22, 2011 at 4:22 PM, harrismh777 wrote:
> > now we get this for input():
> >
> > raw_input("prompt>") --> string
>
> I would have to say that the 2.x behaviour of input() is a mistake
> that's being corrected in 3.x.
On Thu, Apr 21, 2011 at 11:22 PM, harrismh777 wrote:
> My interactive scripts are giving errors on the input(). I discovered
> another fairly significant change in Python3, as discussed in PEP 3111.
>
> I was a little flabbergasted to discover that input() was proposed to be
> removed 'totally' fr
On Fri, Apr 22, 2011 at 4:49 PM, Chris Angelico wrote:
> U NO. NO NO NO. What if someone enters "os.exit()" as their
> number? You shouldn't eval() unchecked user input!
Whoops, I meant sys.exit() - but you probably knew that already.
ChrisA
--
http://mail.python.org/mailman/listinfo/py
On Fri, Apr 22, 2011 at 4:22 PM, harrismh777 wrote:
> now we get this for input():
>
> raw_input("prompt>") --> string
I would have to say that the 2.x behaviour of input() is a mistake
that's being corrected in 3.x. With a simple name like input(), it
should do something simple and straightfor
My interactive scripts are giving errors on the input(). I discovered
another fairly significant change in Python3, as discussed in PEP 3111.
I was a little flabbergasted to discover that input() was proposed to be
removed 'totally' from 3000. Of course I agree with PEP 3111 and am
thankful th
14 matches
Mail list logo