Python Newbie

Jean-Michel Pichavant jeanmichel at sequans.com
Tue Feb 26 14:09:19 EST 2013


----- Original Message -----
> Hi guys,
> 
> Question. Have this code
> 
> intX = 32                          # decl + init int var
> intX_asString = None               # decl + init with NULL string var
> 
> intX_asString = intX.__str__ ()    # convert int to string
> 
> What are these ugly underscores for?
> _________________str___________________
> 
> Peter
> --
> http://mail.python.org/mailman/listinfo/python-list

I can't wait for the 

intX_asString_asBool = intX_asString.__bool__()

if (intX_asString_asBool == True):
  # do something 

;-)

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


More information about the Python-list mailing list