Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39993
| Date | 2013-02-26 20:09 +0100 |
|---|---|
| From | Jean-Michel Pichavant <jeanmichel@sequans.com> |
| Subject | Re: Python Newbie |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2567.1361905815.2939.python-list@python.org> (permalink) |
----- 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.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Python Newbie Jean-Michel Pichavant <jeanmichel@sequans.com> - 2013-02-26 20:09 +0100
Re: Python Newbie "Piterrr" <piotrekd@optonline.net> - 2013-02-26 19:42 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-27 07:57 +1100
csiph-web