Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8271
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!goblin1!goblin.stu.neva.ru!news.task.gda.pl!opal.futuro.pl!news.internetia.pl!nf1.ipartners.pl!ipartners.pl!news2.ipartners.pl!not-for-mail |
|---|---|
| From | "Waldek M." <wm@localhost.localdomain> |
| Newsgroups | comp.lang.python |
| Subject | Re: python 3 constant |
| Date | Thu, 23 Jun 2011 08:40:29 +0200 |
| Organization | Mojito.pl |
| Lines | 17 |
| Message-ID | <192j4fjo2gskg$.dlg@localhost.localdomain> (permalink) |
| References | <927fca1e-ca72-4d33-965c-70b812b83d50@glegroupsg2000goo.googlegroups.com> <mailman.301.1308777491.1164.python-list@python.org> |
| NNTP-Posting-Host | 89.174.106.129 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="iso-8859-2" |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news2.ipartners.pl 1308811224 69081 89.174.106.129 (23 Jun 2011 06:40:24 GMT) |
| X-Complaints-To | abuse@ipartners.pl |
| NNTP-Posting-Date | 23 Jun 2011 06:40:24 GMT |
| X-Antivirus | avast! (VPS 110622-1, 2011-06-22), Outbound message |
| X-Antivirus-Status | Clean |
| User-Agent | 40tude_Dialog/2.0.15.1pl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:8271 |
Show key headers only | View raw
Dnia Wed, 22 Jun 2011 22:17:49 +0100, Noah Hall napisaĆ(a): > On Wed, Jun 22, 2011 at 7:54 PM, sidRo <slacky2005@gmail.com> wrote: >> How to declare a constant in python 3? > > There aren't true constants in Python, but instead we use a standard > defined by PEP 8, which states constants are in all caps, for example, > PI = 3.14, as opposed to pi = 3.14 which could change (according to > PEP 8, that is) That said, there are some workarounds for that: http://code.activestate.com/recipes/65207-constants-in-python/?in=user-97991 Still, I'd reallly like to have constants as a built-in... Best regards, Waldek
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
python 3 constant sidRo <slacky2005@gmail.com> - 2011-06-22 11:54 -0700
Re: python 3 constant Noah Hall <enalicho@gmail.com> - 2011-06-22 22:17 +0100
Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-23 08:40 +0200
Re: python 3 constant Ben Finney <ben+python@benfinney.id.au> - 2011-06-23 17:22 +1000
Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-23 13:58 +0200
Re: python 3 constant Ben Finney <ben+python@benfinney.id.au> - 2011-06-23 23:04 +1000
Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-25 12:42 +0200
Re: python 3 constant Chris Angelico <rosuav@gmail.com> - 2011-06-24 01:29 +1000
Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-23 21:56 +0200
Re: python 3 constant Chris Angelico <rosuav@gmail.com> - 2011-06-24 08:00 +1000
Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-25 12:50 +0200
Re: python 3 constant Chris Angelico <rosuav@gmail.com> - 2011-06-25 20:59 +1000
Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-25 13:24 +0200
Re: python 3 constant alex23 <wuwei23@gmail.com> - 2011-06-23 20:04 -0700
Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-25 12:44 +0200
csiph-web