[Tutor] Why begin a function name with an underscore
Richard D. Moores
rdmoores at gmail.com
Tue Aug 28 11:13:47 CEST 2012
On Tue, Aug 28, 2012 at 1:21 AM, Timo <timomlists at gmail.com> wrote:
> Op 28-08-12 10:06, Richard D. Moores schreef:
>> What if I wanted 3., 1234., etc. to be considered ints, as they are by
>> _validate_int() ?
>
>
>>>> isinstance(3., (int, float))
> True
>
> Because 3. is a float, not int.
And
>>> isinstance(3.7, (int, float))
True
No, I'm asking for something equivalent to _validate_int().
Dick
>
> Timo
>
>>
>> Dick
>>
>> _______________________________________________
>> Tutor maillist - Tutor at python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list