On 06/12/06, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
> Eli Zabielski wrote:
> > How can I check if a variable is an integer?
> if type(aVar) == type(1):

Well, you could also do "type(aVar) == int", which is clearer.

Or "type(aVar) in (int, long)", depending on exactly what you mean by "integer".

-- 
John.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to