> i have declared a function like this:
> 
> def aFunction ( arg1 , arg2 = 0):
>          ....
>          print type(arg2)
> 
> when i try to print the type of arg2, it gives me 'str'
> type..why is it  not integer type, since i have declared
 > it as 0 ??


 >>> def a(arg1, arg2=0):
...     print type(arg2)
...
 >>> a("something")
<type 'int'>


Looks like it's an int to me.  You must be doing something 
spurious in your mysterious "...." that changes the data type.

-tkc



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to