Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54785 > unrolled thread
| Started by | Νίκος <nikos.gr33k@gmail.com> |
|---|---|
| First post | 2013-09-26 10:26 +0300 |
| Last post | 2013-09-29 13:32 -0400 |
| Articles | 20 on this page of 107 — 25 participants |
Back to article view | Back to comp.lang.python
Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 10:26 +0300
Re: Handling 3 operands in an expression without raising an exception Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-09-26 10:48 +0300
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 10:51 +0300
Re: Handling 3 operands in an expression without raising an exception Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-09-26 11:12 +0300
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 11:39 +0300
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 11:46 +0300
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 11:50 +0300
Re: Handling 3 operands in an expression without raising an exception Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-09-26 12:20 +0300
Re: Handling 3 operands in an expression without raising an exception Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-09-26 12:04 +0300
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 12:45 +0300
Re: Handling 3 operands in an expression without raising an exception Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-09-26 11:07 +0200
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 12:31 +0300
Re: Handling 3 operands in an expression without raising an exception Maarten <maarten.sneep@knmi.nl> - 2013-09-26 02:52 -0700
Re: Handling 3 operands in an expression without raising an exception Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-09-26 12:01 +0200
Re: Handling 3 operands in an expression without raising an exception "James Harris" <james.harris.1@gmail.com> - 2013-09-26 11:53 +0100
Re: Handling 3 operands in an expression without raising an exception alex23 <wuwei23@gmail.com> - 2013-09-27 10:05 +1000
Re: Handling 3 operands in an expression without raising an exception Chris Angelico <rosuav@gmail.com> - 2013-09-26 18:41 +1000
Re: Handling 3 operands in an expression without raising an exception Tim Golden <mail@timgolden.me.uk> - 2013-09-26 09:47 +0100
Re: Handling 3 operands in an expression without raising an exception Nobody <nobody@nowhere.com> - 2013-09-26 09:55 +0100
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 12:56 +0300
Re: Handling 3 operands in an expression without raising an exception Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-09-26 12:12 +0200
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 13:18 +0300
Re: Handling 3 operands in an expression without raising an exception Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-09-26 12:41 +0200
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 13:51 +0300
Re: Handling 3 operands in an expression without raising an exception Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-09-26 13:07 +0200
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 14:25 +0300
Re: Handling 3 operands in an expression without raising an exception Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-09-26 13:47 +0200
Re: Handling 3 operands in an expression without raising an exception Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-26 14:42 +0000
Re: Handling 3 operands in an expression without raising an exception Dave Angel <davea@davea.name> - 2013-09-26 11:24 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 15:39 +0300
Re: Handling 3 operands in an expression without raising an exception Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-09-26 14:53 +0200
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 16:34 +0300
Re: Handling 3 operands in an expression without raising an exception Dave Angel <davea@davea.name> - 2013-09-26 14:22 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-26 19:58 +0300
Re: Handling 3 operands in an expression without raising an exception Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-26 20:16 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-27 01:14 +0300
Re: Handling 3 operands in an expression without raising an exception Dave Angel <davea@davea.name> - 2013-09-26 22:55 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-27 12:19 +0300
Re: Handling 3 operands in an expression without raising an exception Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-27 09:26 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-27 13:04 +0300
Re: Handling 3 operands in an expression without raising an exception Dave Angel <davea@davea.name> - 2013-09-27 10:43 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-27 14:15 +0300
Re: Handling 3 operands in an expression without raising an exception Dave Angel <davea@davea.name> - 2013-09-27 12:17 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-27 15:51 +0300
Re: Handling 3 operands in an expression without raising an exception rusi <rustompmody@gmail.com> - 2013-09-28 10:29 -0700
Re: Handling 3 operands in an expression without raising an exception Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-27 15:16 +0000
Re: Handling 3 operands in an expression without raising an exception Grant Edwards <invalid@invalid.invalid> - 2013-09-27 16:04 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-27 19:47 +0300
Re: Handling 3 operands in an expression without raising an exception Neil Cerutti <neilc@norwich.edu> - 2013-09-27 16:56 +0000
Re: Handling 3 operands in an expression without raising an exception Grant Edwards <invalid@invalid.invalid> - 2013-09-27 17:00 +0000
Re: Handling 3 operands in an expression without raising an exception Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-27 13:19 -0400
Re: Handling 3 operands in an expression without raising an exception Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-09-27 18:32 +0100
Re: Handling 3 operands in an expression without raising an exception Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-27 18:49 +0000
Re: Handling 3 operands in an expression without raising an exception Grant Edwards <invalid@invalid.invalid> - 2013-09-27 18:54 +0000
Re: Handling 3 operands in an expression without raising an exception Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-27 15:21 -0400
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-28 01:06 +0300
Re: Handling 3 operands in an expression without raising an exception Dave Angel <davea@davea.name> - 2013-09-27 22:26 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-28 12:33 +0300
Re: Handling 3 operands in an expression without raising an exception Chris Angelico <rosuav@gmail.com> - 2013-09-28 20:19 +1000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-28 16:23 +0300
Re: Handling 3 operands in an expression without raising an exception Andreas Perstinger <andipersti@gmail.com> - 2013-09-28 17:02 +0200
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-28 19:14 +0300
Re: Handling 3 operands in an expression without raising an exception Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-09-28 18:53 +0100
Re: Handling 3 operands in an expression without raising an exception Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-28 14:21 -0400
Re: Handling 3 operands in an expression without raising an exception Zero Piraeus <z@etiol.net> - 2013-09-28 15:38 -0300
Re: Handling 3 operands in an expression without raising an exception Neil Cerutti <neilc@norwich.edu> - 2013-09-30 11:32 +0000
Re: Handling 3 operands in an expression without raising an exception Chris Angelico <rosuav@gmail.com> - 2013-09-30 21:53 +1000
Re: Handling 3 operands in an expression without raising an exception Neil Cerutti <neilc@norwich.edu> - 2013-09-30 12:56 +0000
Re: Handling 3 operands in an expression without raising an exception Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-09-28 19:45 +0100
Re: Handling 3 operands in an expression without raising an exception Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-28 19:20 +0000
Re: Handling 3 operands in an expression without raising an exception Chris Angelico <rosuav@gmail.com> - 2013-09-29 09:04 +1000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-29 10:35 +0300
Re: Handling 3 operands in an expression without raising an exception Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-09-29 12:35 +0300
Re: Handling 3 operands in an expression without raising an exception Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-29 09:48 +0000
Re: Handling 3 operands in an expression without raising an exception Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-09-29 14:04 +0300
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-29 14:14 +0300
Re: Handling 3 operands in an expression without raising an exception Dave Angel <davea@davea.name> - 2013-09-29 11:27 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-29 14:34 +0300
Re: Handling 3 operands in an expression without raising an exception Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-29 21:15 +0000
Re: Handling 3 operands in an expression without raising an exception Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-09-30 16:07 +0100
Re: Handling 3 operands in an expression without raising an exception Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-09-29 15:24 +0300
Re: Handling 3 operands in an expression without raising an exception Dave Angel <davea@davea.name> - 2013-09-29 09:50 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-29 13:17 +0300
Re: Handling 3 operands in an expression without raising an exception Dave Angel <davea@davea.name> - 2013-09-29 10:57 +0000
Re: Handling 3 operands in an expression without raising an exception Chris Angelico <rosuav@gmail.com> - 2013-09-29 23:58 +1000
Re: Handling 3 operands in an expression without raising an exception Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-29 21:01 +0000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-29 14:06 +0300
Re: Handling 3 operands in an expression without raising an exception Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-09-29 12:48 +0200
Re: Handling 3 operands in an expression without raising an exception Piet van Oostrum <piet@vanoostrum.org> - 2013-09-29 13:24 -0400
Re: Handling 3 operands in an expression without raising an exception MRAB <python@mrabarnett.plus.com> - 2013-09-29 18:44 +0100
Re: Handling 3 operands in an expression without raising an exception Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-29 14:45 -0400
Re: Handling 3 operands in an expression without raising an exception Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-09-30 16:05 +0100
Re: Handling 3 operands in an expression without raising an exception Ben Finney <ben+python@benfinney.id.au> - 2013-09-29 11:35 +1000
Re: Handling 3 operands in an expression without raising an exception Chris Angelico <rosuav@gmail.com> - 2013-09-28 11:59 +1000
Re: Handling 3 operands in an expression without raising an exception Νίκος <nikos.gr33k@gmail.com> - 2013-09-28 12:14 +0300
Re: Handling 3 operands in an expression without raising an exception Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-09-28 15:53 +0200
Re: Handling 3 operands in an expression without raising an exception Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-28 12:15 -0400
Re: Handling 3 operands in an expression without raising an exception Robert Kern <robert.kern@gmail.com> - 2013-09-28 12:18 +0100
Re: Handling 3 operands in an expression without raising an exception giacomo boffi <pecore@pascolo.net> - 2013-09-29 17:28 +0200
Re: Handling 3 operands in an expression without raising an exception Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-29 12:07 -0400
Re: Handling 3 operands in an expression without raising an exception giacomo boffi <pecore@pascolo.net> - 2013-09-29 23:39 +0200
Re: Handling 3 operands in an expression without raising an exception giacomo boffi <pecore@pascolo.net> - 2013-09-29 23:49 +0200
Re: Handling 3 operands in an expression without raising an exception Chris Angelico <rosuav@gmail.com> - 2013-09-30 02:18 +1000
Re: Handling 3 operands in an expression without raising an exception Dave Angel <davea@davea.name> - 2013-09-26 20:37 +0000
Re: Handling 3 operands in an expression without raising an exception Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-26 14:38 +0000
Re: Handling 3 operands in an expression without raising an exception Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-26 14:38 +0000
Re: Handling 3 operands in an expression without raising an exception Gene Heskett <gheskett@wdtv.com> - 2013-09-29 13:32 -0400
Page 4 of 6 — ← Prev page 1 2 3 [4] 5 6 Next page →
| From | Andreas Perstinger <andipersti@gmail.com> |
|---|---|
| Date | 2013-09-28 17:02 +0200 |
| Message-ID | <mailman.413.1380380875.18130.python-list@python.org> |
| In reply to | #54940 |
Νίκος <nikos.gr33k@gmail.com> wrote: >Στις 28/9/2013 1:19 μμ, ο/η Chris Angelico έγραψε: >> [ROLL] Rosuav rolls his eyes: 1, 1, totalling 2. >> >> Then split your try blocks! You've already been told this. >> >No we didn't have said this. if you are referring to this: At least Denis told you about 24 hours ago: https://mail.python.org/pipermail/python-list/2013-September/656318.html So either do it like that (which is the reasonable way) or look for another programming language. Bye, Andreas
[toc] | [prev] | [next] | [standalone]
| From | Νίκος <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-09-28 19:14 +0300 |
| Message-ID | <l26v8p$bj7$1@dont-email.me> |
| In reply to | #54944 |
Στις 28/9/2013 6:02 μμ, ο/η Andreas Perstinger έγραψε: > Νίκος <nikos.gr33k@gmail.com> wrote: > >> Στις 28/9/2013 1:19 μμ, ο/η Chris Angelico έγραψε: >>> [ROLL] Rosuav rolls his eyes: 1, 1, totalling 2. >>> >>> Then split your try blocks! You've already been told this. >>> >> No we didn't have said this. if you are referring to this: > > At least Denis told you about 24 hours ago: > https://mail.python.org/pipermail/python-list/2013-September/656318.html > > So either do it like that (which is the reasonable way) or look for > another programming language. > > Bye, Andreas > I know what he has said bit this is now what i need.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2013-09-28 18:53 +0100 |
| Message-ID | <mailman.425.1380390846.18130.python-list@python.org> |
| In reply to | #54949 |
On 28/09/2013 17:14, Νίκος wrote: > I know what he has said bit this is now what i need. You actually need the tool that was used on King Edward II. -- Cheers. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| Date | 2013-09-28 14:21 -0400 |
| Message-ID | <mailman.428.1380392518.18130.python-list@python.org> |
| In reply to | #54949 |
[Multipart message — attachments visible in raw view] — view raw
On Sat, Sep 28, 2013 at 1:53 PM, Mark Lawrence <breamoreboy@yahoo.co.uk>wrote: > On 28/09/2013 17:14, Νίκος wrote: > > I know what he has said bit this is now what i need. >> > > You actually need the tool that was used on King Edward II. > > > -- > Cheers. > > Mark Lawrence > > -- > https://mail.python.org/**mailman/listinfo/python-list<https://mail.python.org/mailman/listinfo/python-list> > Here's an old chestnut from June: > BTW both scripts at > http://superhost.gr/~dauwin/metrites.py > and at > http://superhost.gr/~dauwin/cgi-bin/metrites.py > show the world the passwords to your databases in plain text. He said he was working on it! Maybe as soon as that one liner gets revealed. -- Joel Goldstick http://joelgoldstick.com
[toc] | [prev] | [next] | [standalone]
| From | Zero Piraeus <z@etiol.net> |
|---|---|
| Date | 2013-09-28 15:38 -0300 |
| Message-ID | <mailman.429.1380393536.18130.python-list@python.org> |
| In reply to | #54949 |
: > On Sat, Sep 28, 2013 at 1:53 PM, Mark Lawrence <breamoreboy@yahoo.co.uk>wrote: > > You actually need the tool that was used on King Edward II. To be clear, Mark, you are calling for Νίκος to be tortured to death with a red hot poker, yes? I'm going to go out on a limb and suggest that such a suggestion is outside what people generally consider acceptable on this list. -[]z.
[toc] | [prev] | [next] | [standalone]
| From | Neil Cerutti <neilc@norwich.edu> |
|---|---|
| Date | 2013-09-30 11:32 +0000 |
| Message-ID | <bat5qlFhvboU1@mid.individual.net> |
| In reply to | #54970 |
On 2013-09-28, Zero Piraeus <z@etiol.net> wrote: >: > >> On Sat, Sep 28, 2013 at 1:53 PM, Mark Lawrence <breamoreboy@yahoo.co.uk>wrote: >> > You actually need the tool that was used on King Edward II. > > To be clear, Mark, you are calling for ?????????? to be tortured to death > with a red hot poker, yes? > > I'm going to go out on a limb and suggest that such a suggestion is > outside what people generally consider acceptable on this list. It's reassuring that even a guy like Nikos has his White Knights. -- Neil Cerutti
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-09-30 21:53 +1000 |
| Message-ID | <mailman.479.1380542022.18130.python-list@python.org> |
| In reply to | #55061 |
On Mon, Sep 30, 2013 at 9:32 PM, Neil Cerutti <neilc@norwich.edu> wrote: > On 2013-09-28, Zero Piraeus <z@etiol.net> wrote: >>: >> >>> On Sat, Sep 28, 2013 at 1:53 PM, Mark Lawrence <breamoreboy@yahoo.co.uk>wrote: >>> > You actually need the tool that was used on King Edward II. >> >> To be clear, Mark, you are calling for ?????????? to be tortured to death >> with a red hot poker, yes? >> >> I'm going to go out on a limb and suggest that such a suggestion is >> outside what people generally consider acceptable on this list. > > It's reassuring that even a guy like Nikos has his White Knights. Ahoy! Ahoy! Check! Actually, it's more that even those of us who will put him down verbally don't actually want to see him tortured to death. I've strongly recommended that he either shape up or ship out (learn to code or get out of programming as a business), but that doesn't in any way mean I would rejoice at his death. But he is annoying. Very annoying. And I completely understand the frustration that leads people to want him to suffer great pain. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Neil Cerutti <neilc@norwich.edu> |
|---|---|
| Date | 2013-09-30 12:56 +0000 |
| Message-ID | <bataocFitsiU1@mid.individual.net> |
| In reply to | #55063 |
On 2013-09-30, Chris Angelico <rosuav@gmail.com> wrote: >>>> > You actually need the tool that was used on King Edward >>>> > II. >>> >>> To be clear, Mark, you are calling for ?????????? to be >>> tortured to death with a red hot poker, yes? >>> >>> I'm going to go out on a limb and suggest that such a >>> suggestion is outside what people generally consider >>> acceptable on this list. >> >> It's reassuring that even a guy like Nikos has his White >> Knights. > > Ahoy! Ahoy! Check! > > Actually, it's more that even those of us who will put him down > verbally don't actually want to see him tortured to death. I've > strongly recommended that he either shape up or ship out (learn to > code or get out of programming as a business), but that doesn't in any > way mean I would rejoice at his death. This makes perfect sense. It's be sort of like being one of the police in Dallas protecting Oswald; it's from a sense of duty, rather than a generally sincere love. > But he is annoying. Very annoying. And I completely understand > the frustration that leads people to want him to suffer great > pain. I don't want him to suffer great pain, but it would please me if it were possible to annoy him in some way. Like maybe with the sound of a mosquito. BZZZZ! BzzzzzZZZZZ! -- Neil Cerutti
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2013-09-28 19:45 +0100 |
| Message-ID | <mailman.430.1380393952.18130.python-list@python.org> |
| In reply to | #54949 |
On 28/09/2013 19:38, Zero Piraeus wrote: > : > >> On Sat, Sep 28, 2013 at 1:53 PM, Mark Lawrence <breamoreboy@yahoo.co.uk>wrote: >>> You actually need the tool that was used on King Edward II. > > To be clear, Mark, you are calling for Νίκος to be tortured to death > with a red hot poker, yes? > > I'm going to go out on a limb and suggest that such a suggestion is > outside what people generally consider acceptable on this list. > > -[]z. > Not tortured, simply murdered so we don't have to put up with his completely unacceptable behaviour, which sadly is thriving owing to so many people ignoring the "do not feed this moron" signs. -- Cheers. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-09-28 19:20 +0000 |
| Message-ID | <52472bf6$0$30000$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #54971 |
On Sat, 28 Sep 2013 19:45:40 +0100, Mark Lawrence wrote: > Not tortured, simply murdered If your aim was to prove that you're a waste of space than Nikos, you've admirably succeeded. *plonk* -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-09-29 09:04 +1000 |
| Message-ID | <mailman.436.1380409890.18130.python-list@python.org> |
| In reply to | #54949 |
On Sun, Sep 29, 2013 at 4:45 AM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: > Not tortured, simply murdered so we don't have to put up with his completely > unacceptable behaviour, which sadly is thriving owing to so many people > ignoring the "do not feed this moron" signs. You miss one important factor in these discussions: the silent majority of readers. We have a few people here who are not "worth" responding to, as they're highly unlikely to listen (the most noteworthy other example being jmf on Unicode), but that doesn't mean the threads can't be useful to someone else. And sometimes there can be some extremely entertaining conversation, too. That's also why I don't plonk anyone :) ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Νίκος <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-09-29 10:35 +0300 |
| Message-ID | <l28l88$725$1@dont-email.me> |
| In reply to | #54980 |
Στις 29/9/2013 2:04 πμ, ο/η Chris Angelico έγραψε:
> On Sun, Sep 29, 2013 at 4:45 AM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
>> Not tortured, simply murdered so we don't have to put up with his completely
>> unacceptable behaviour, which sadly is thriving owing to so many people
>> ignoring the "do not feed this moron" signs.
>
> You miss one important factor in these discussions: the silent
> majority of readers. We have a few people here who are not "worth"
> responding to, as they're highly unlikely to listen (the most
> noteworthy other example being jmf on Unicode), but that doesn't mean
> the threads can't be useful to someone else. And sometimes there can
> be some extremely entertaining conversation, too.
>
> That's also why I don't plonk anyone :)
Its not that i don't listen, its that i want something to be implemented
in a specific way.
ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or
os.environ.get('REMOTE_ADDR', "Cannot Resolve") )
try:
gi = pygeoip.GeoIP('/usr/local/share/GeoIPCity.dat')
city = gi.time_zone_by_addr( ipval )
host = socket.gethostbyaddr( ipval ) [0]
except socket.gaierror as e:
city = "Άγνωστη Πόλη"
host = "Άγνωστη Προέλευση"
My question was if the above code, in the except clause, can be written
in 1-line while identifying which one of the two variables have failed
to be assigned a value in the try: clause and assign to it respectively.
And i don't mean like this:
if not city:
city ="blabla"
if not host:
host="blablabla"
Can thes be witten without and if perhaps with the use of 'or' operator
in 1-line within the except clause?
[toc] | [prev] | [next] | [standalone]
| From | Jussi Piitulainen <jpiitula@ling.helsinki.fi> |
|---|---|
| Date | 2013-09-29 12:35 +0300 |
| Message-ID | <qotk3i0q8bu.fsf@ruuvi.it.helsinki.fi> |
| In reply to | #54984 |
Νίκος writes:
> And i don't mean like this:
>
> if not city:
> city ="blabla"
> if not host:
> host="blablabla"
>
>
> Can thes be witten without and if perhaps with the use of 'or'
> operator in 1-line within the except clause?
try:
...
except socket.gaierror as e:
# watch out, a composition of bad advice (on demand)
city, host = ( ('city' in locals() or "blabla"),
('host' in locals() or "blablabla") )
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-09-29 09:48 +0000 |
| Message-ID | <5247f760$0$29988$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #54996 |
On Sun, 29 Sep 2013 12:35:17 +0300, Jussi Piitulainen wrote:
> try:
> ...
> except socket.gaierror as e:
> # watch out, a composition of bad advice (on demand) city, host = (
> ('city' in locals() or "blabla"),
> ('host' in locals() or "blablabla") )
Bad advice, and buggy as well.
py> city = "New New York"
py> ('city' in locals() or "Blah blah")
True
Oh man, can you imagine Nikos trying to debug that?
--
Steven
[toc] | [prev] | [next] | [standalone]
| From | Jussi Piitulainen <jpiitula@ling.helsinki.fi> |
|---|---|
| Date | 2013-09-29 14:04 +0300 |
| Message-ID | <qotr4c7khx8.fsf@ruuvi.it.helsinki.fi> |
| In reply to | #54998 |
Steven D'Aprano writes:
> On Sun, 29 Sep 2013 12:35:17 +0300, Jussi Piitulainen wrote:
>
> > try:
> > ...
> > except socket.gaierror as e:
> > # watch out, a composition of bad advice (on demand) city, host = (
> > ('city' in locals() or "blabla"),
> > ('host' in locals() or "blablabla") )
>
> Bad advice, and buggy as well.
>
> py> city = "New New York"
> py> ('city' in locals() or "Blah blah")
> True
>
> Oh man, can you imagine Nikos trying to debug that?
Thanks. Sorry. This hurts. I didn't mean it to be buggy.
Let's see. The task is to assign a default value to city and host, if
they haven't a value yet; on one line (which I take to mean one
statement); in an "except" block where we may not know which
assignment failed in the "try" block; without "if"; but "or" is
allowed.
But the logic I was trying to implement is
city, host = ( (city if 'city' in locals() else "default city"),
(host if 'host' in locals() else "default host") )
which uses an "if". The old tricks of using "or" and stuff for this
would surely go too far.
I know!
city, host = ( locals().get('city', "default city"),
locals().get('host', "default host") )
Testing if the variables only exists when actually assigned:
>>> def foo(x, y):
... if x: foo = None
... if y: bar = "bar"
... return locals()
...
>>> foo(False, False)
{'y': False, 'x': False}
>>> foo(False, True)
{'y': True, 'x': False, 'bar': 'bar'}
Seems so.
What a monster, though. I don't even want to know if this, too, is
buggy in some way. It looks fragile.
Nikos, don't do this. The way to test if an assignment failed is to
use a try-catch. The way to know which one failed is to put each in
its own try-catch.
[toc] | [prev] | [next] | [standalone]
| From | Νίκος <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-09-29 14:14 +0300 |
| Message-ID | <l2922f$tf1$1@dont-email.me> |
| In reply to | #55005 |
Στις 29/9/2013 2:04 μμ, ο/η Jussi Piitulainen έγραψε:
> Steven D'Aprano writes:
>
>> On Sun, 29 Sep 2013 12:35:17 +0300, Jussi Piitulainen wrote:
>>
>>> try:
>>> ...
>>> except socket.gaierror as e:
>>> # watch out, a composition of bad advice (on demand) city, host = (
>>> ('city' in locals() or "blabla"),
>>> ('host' in locals() or "blablabla") )
>>
>> Bad advice, and buggy as well.
>>
>> py> city = "New New York"
>> py> ('city' in locals() or "Blah blah")
>> True
>>
>> Oh man, can you imagine Nikos trying to debug that?
>
> Thanks. Sorry. This hurts. I didn't mean it to be buggy.
>
> Let's see. The task is to assign a default value to city and host, if
> they haven't a value yet; on one line (which I take to mean one
> statement); in an "except" block where we may not know which
> assignment failed in the "try" block; without "if"; but "or" is
> allowed.
>
> But the logic I was trying to implement is
>
> city, host = ( (city if 'city' in locals() else "default city"),
> (host if 'host' in locals() else "default host") )
>
> which uses an "if". The old tricks of using "or" and stuff for this
> would surely go too far.
>
> I know!
>
> city, host = ( locals().get('city', "default city"),
> locals().get('host', "default host") )
I tend to like this: I might use it because it is a clear way to tell
what var failed in the try clause and default it to soemthing.
> Testing if the variables only exists when actually assigned:
>
> >>> def foo(x, y):
> ... if x: foo = None
> ... if y: bar = "bar"
> ... return locals()
> ...
> >>> foo(False, False)
> {'y': False, 'x': False}
> >>> foo(False, True)
> {'y': True, 'x': False, 'bar': 'bar'}
>
> Seems so.
>
> What a monster, though. I don't even want to know if this, too, is
> buggy in some way. It looks fragile.
>
> Nikos, don't do this. The way to test if an assignment failed is to
> use a try-catch. The way to know which one failed is to put each in
> its own try-catch.
Dave's way though seems better.
Assign the vars default string and if they get re-assinged correctly
that would be ideal, otherwise we have already given them the defaults.
ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or
os.environ.get('REMOTE_ADDR', "Cannot Resolve") )
city = "Άγνωστη Πόλη"
host = "Άγνωστη Προέλευση"
try:
gi = pygeoip.GeoIP('/usr/local/share/GeoIPCity.dat')
city = gi.time_zone_by_addr( ipval )
host = socket.gethostbyaddr( ipval ) [0]
except Exception as e:
print( "metrites.py => (%s): " % lastvisit, repr( sys.exc_info() ),
file=open('/tmp/err.out', 'w') )
I'll think i'll stick to this solution.
[toc] | [prev] | [next] | [standalone]
| From | Dave Angel <davea@davea.name> |
|---|---|
| Date | 2013-09-29 11:27 +0000 |
| Message-ID | <mailman.447.1380454099.18130.python-list@python.org> |
| In reply to | #55008 |
On 29/9/2013 07:14, Νίκος wrote:
> Dave's way though seems better.
> Assign the vars default string and if they get re-assinged correctly
> that would be ideal, otherwise we have already given them the defaults.
>
> ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or
> os.environ.get('REMOTE_ADDR', "Cannot Resolve") )
> city = "Άγνωστη Πόλη"
> host = "Άγνωστη Προέλευση"
> try:
> gi = pygeoip.GeoIP('/usr/local/share/GeoIPCity.dat')
> city = gi.time_zone_by_addr( ipval )
> host = socket.gethostbyaddr( ipval ) [0]
> except Exception as e:
> print( "metrites.py => (%s): " % lastvisit, repr( sys.exc_info() ),
> file=open('/tmp/err.out', 'w') )
>
> I'll think i'll stick to this solution.
>
But you've put gi back in to the try-block. If it really belongs there,
then you'd better give it a default value as well. On the other hand,
if it can't get an exception, you should move it out.
--
DaveA
[toc] | [prev] | [next] | [standalone]
| From | Νίκος <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-09-29 14:34 +0300 |
| Message-ID | <l29379$3ur$1@dont-email.me> |
| In reply to | #55010 |
Στις 29/9/2013 2:27 μμ, ο/η Dave Angel έγραψε:
> On 29/9/2013 07:14, Νίκος wrote:
>
>
>> Dave's way though seems better.
>> Assign the vars default string and if they get re-assinged correctly
>> that would be ideal, otherwise we have already given them the defaults.
>>
>> ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or
>> os.environ.get('REMOTE_ADDR', "Cannot Resolve") )
>> city = "Άγνωστη Πόλη"
>> host = "Άγνωστη Προέλευση"
>> try:
>> gi = pygeoip.GeoIP('/usr/local/share/GeoIPCity.dat')
>> city = gi.time_zone_by_addr( ipval )
>> host = socket.gethostbyaddr( ipval ) [0]
>> except Exception as e:
>> print( "metrites.py => (%s): " % lastvisit, repr( sys.exc_info() ),
>> file=open('/tmp/err.out', 'w') )
>>
>> I'll think i'll stick to this solution.
>>
>
> But you've put gi back in to the try-block. If it really belongs there,
> then you'd better give it a default value as well. On the other hand,
> if it can't get an exception, you should move it out.
You are right i just put it there because its being relevant to the
whole geoip things. Givign it a default value will not really help much
because i'am not printing it later on it just is necessay to poitn to an
existing geopip file in plcace.
If it fails to be assinged then i will just cat /etc/err/out and see
that it erred out and then take action to fix it.
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2013-09-29 21:15 +0000 |
| Message-ID | <l2a5a0$suv$2@dont-email.me> |
| In reply to | #55011 |
On Sun, 29 Sep 2013 14:34:02 +0300, Νίκος wrote:
> Στις 29/9/2013 2:27 μμ, ο/η Dave Angel έγραψε:
>> On 29/9/2013 07:14, Νίκος wrote:
>>
>>
>>> Dave's way though seems better.
>>> Assign the vars default string and if they get re-assinged correctly
>>> that would be ideal, otherwise we have already given them the
>>> defaults.
>>>
>>> ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or
>>> os.environ.get('REMOTE_ADDR', "Cannot Resolve") )
>>> city = "Άγνωστη Πόλη"
>>> host = "Άγνωστη Προέλευση"
>>> try:
>>> gi = pygeoip.GeoIP('/usr/local/share/GeoIPCity.dat')
>>> city = gi.time_zone_by_addr( ipval )
>>> host = socket.gethostbyaddr( ipval ) [0]
>>> except Exception as e:
>>> print( "metrites.py => (%s): " % lastvisit, repr( sys.exc_info()
),
>>> file=open('/tmp/err.out', 'w') )
>>>
>>> I'll think i'll stick to this solution.
>>>
>>>
>> But you've put gi back in to the try-block. If it really belongs
>> there,
>> then you'd better give it a default value as well. On the other hand,
>> if it can't get an exception, you should move it out.
>
> You are right i just put it there because its being relevant to the
> whole geoip things. Givign it a default value will not really help much
> because i'am not printing it later on it just is necessay to poitn to an
> existing geopip file in plcace.
>
> If it fails to be assinged then i will just cat /etc/err/out and see
> that it erred out and then take action to fix it.
Nick, you have now spent 4 days arguing over a minor coding problem that
you were given solutions to on the first day, primarily because you feel
that the solutions you are being offend some programming aesthetic you
have.
I suggest that it's time for you to re-evaluate what you want from this
ng, and indeed what language you want to code in if your perl "minimal
code possible" aesthetic is so important to you.
If you want good python code, then stop telling everyone here that their
working solutions are wrong and should be more like your dysfunctional
code, and use the solutions you are given.
If you want to write minimalist perl code, then stop using python and use
perl.
In either case, you need to stop arguing with people who are offering you
solutions to your problems solely based on the fact that you don't like
their coding styles.
You are the one who comes here asking for solutions. Either accept the
solutions you are offered, or stop asking for them.
--
Denis McMahon, denismfmcmahon@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2013-09-30 16:07 +0100 |
| Message-ID | <mailman.493.1380553805.18130.python-list@python.org> |
| In reply to | #55036 |
On 29/09/2013 22:15, Denis McMahon wrote: > > Nick, you have now spent 4 days arguing over a minor coding problem that > you were given solutions to on the first day, primarily because you feel > that the solutions you are being offend some programming aesthetic you > have. > > I suggest that it's time for you to re-evaluate what you want from this > ng, and indeed what language you want to code in if your perl "minimal > code possible" aesthetic is so important to you. > > If you want good python code, then stop telling everyone here that their > working solutions are wrong and should be more like your dysfunctional > code, and use the solutions you are given. > > If you want to write minimalist perl code, then stop using python and use > perl. > > In either case, you need to stop arguing with people who are offering you > solutions to your problems solely based on the fact that you don't like > their coding styles. > > You are the one who comes here asking for solutions. Either accept the > solutions you are offered, or stop asking for them. > +googol -- Cheers. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
Page 4 of 6 — ← Prev page 1 2 3 [4] 5 6 Next page →
Back to top | Article view | comp.lang.python
csiph-web