Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44550
| Date | 2013-04-30 11:58 -0400 |
|---|---|
| From | Dave Angel <davea@davea.name> |
| Subject | Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. |
| References | <ad277b74-0fbd-456d-915e-e87743dc16df@googlegroups.com> <517FE68A.1000703@davea.name> <CAPTjJmp9_Mc+uhP3n1DsSLUpo4=81xo4Qv-5zLj3K_qD=AwfXA@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1183.1367337534.3114.python-list@python.org> (permalink) |
On 04/30/2013 11:49 AM, Chris Angelico wrote: > On Wed, May 1, 2013 at 1:43 AM, Dave Angel <davea@davea.name> wrote: >> On 04/30/2013 11:27 AM, tromeo@mdlogix.com wrote: >>> >>> >>> Please help me to debug >>> >>> ------- >>> shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) >>> ^ >>> SyntaxError: invalid syntax >>> >> >> 0o666 is indeed a syntax error. What is that value supposed to be? If it's >> intended to be an int that's equal to octal 666, just use 438 > > Without checking docs, I would guess that to be Unix file permissions, > which make most sense in octal. > > So put the octal description in the comment. I think the Python 2.x syntax for octal is a travesty. And of course it's non-portable to Python 3. I would not intentionally leave 0666 in my source code, unless there was some other overriding reason for it. And then I'd surround it with snide remarks. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. tromeo@mdlogix.com - 2013-04-30 08:27 -0700
Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. Joel Goldstick <joel.goldstick@gmail.com> - 2013-04-30 11:36 -0400
Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. Chris Angelico <rosuav@gmail.com> - 2013-05-01 01:37 +1000
Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. Tony Romeo <tromeo@mdlogix.com> - 2013-04-30 08:52 -0700
Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. Chris Angelico <rosuav@gmail.com> - 2013-05-01 01:58 +1000
Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. Dave Angel <davea@davea.name> - 2013-04-30 11:43 -0400
Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. Chris Angelico <rosuav@gmail.com> - 2013-05-01 01:49 +1000
Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. Dave Angel <davea@davea.name> - 2013-04-30 11:58 -0400
Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. Chris Angelico <rosuav@gmail.com> - 2013-05-01 02:06 +1000
Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. Tony Romeo <tromeo@mdlogix.com> - 2013-04-30 11:10 -0700
Re: shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error. Chris Angelico <rosuav@gmail.com> - 2013-05-01 07:51 +1000
csiph-web