Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39545
| Date | 2013-02-22 12:05 +0100 |
|---|---|
| From | Steve Simmons <square.steve@gmail.com> |
| Subject | Re: Python Newbie |
| References | <cad0eacc-6040-4a00-bd05-7fabfd2fa70e@googlegroups.com> <5c262e95-b3a8-4f2a-b752-84b30bf4f81e@googlegroups.com> <512747bd$0$29988$c3e8da3$5496439d@news.astraweb.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2252.1361531454.2939.python-list@python.org> (permalink) |
Dear Mr D'Aprano,
I thank you for your post but I must complain in the strongest possible
terms that it was not enclosed in the correct delimeters. It should
have been enclosed in a <humour>... </humour> pair (or
<humor>...</humor> if you are American).
I was drinking coffee at the time I started reading your post and,
entirely due to your negligent lack of proper delimiters, much of my
coffee is now irretrievably resident in my keyboard. My lawyers will be
in touch...
On 22/02/2013 11:26, Steven D'Aprano wrote:
> On Thu, 21 Feb 2013 14:40:37 -0800, piterrr.dolinski wrote:
>
>> With Python, I am having to do this
>>
>> code
>> code
>>
>> ##############################
>>
>> if (some condition):
>> code
>> code
>>
>> ##############################
>
> I prefer this:
>
>
> # WARNING WARNING WARNING IF STATEMENT AHEAD BEWARE BEWARE BEWARE
> if something():
> do(stuff)
> # WHEW IF STATEMENT FINISHED!!! WE SURVIVED, THANK THE GODS!!!
>
>
> That way I can be sure that people reading it will know it is an "if" and
> not a "for" or "while", just in case the actual code wasn't clear enough.
>
>
>
>> I am nervous about using variables "out of the blue", without having to
>> declare them.
> I feel your pain. I'm nervous about declaring variables "out of the
> blue", without having to declare that I'm about to declare them. I live
> in hope that some day I will find a language that lets me write:
>
> FORWARD VARS:
> int x;
> double y;
> str s;
>
> VARS:
> int x;
> float y;
> str s;
>
>
> and have the compiler catch my error in declaring y as a float instead of
> a double. Then I will be one step closer to my dream of not having to
> understand the code I write.
>
>
>> For example, when I write "i = 0" it is perfectly OK to
>> Python without 'i' being declared earlier. How do I know that I haven't
>> used this variable earlier and I am unintentionally overwriting the
>> value? I find I constantly have to use the search facility in the
>> editor, which is not fun.
> Some people suggest that functions should be small enough to read over in
> a glance, or at least a couple of glances. They even say that variable
> names should be meaningful, so you can tell whether a variable has been
> used from context. I say, fi to that! Programming should be a challenge!
> It should be exciting! Which is why I never use functions, and always use
> the same single-letter variable with a cryptographic hash to distinguish
> them.
>
> i048b8497cf86dab9dade2ce6beddf13a = []
> i048b6497cd85d9b9da2a3ce6bdedf167 = 42
>
>
> *wink*
>
>
> I'm not going to apologise for taking the piss, although I do hope you
> will take it in the spirit it is intended: constructive criticism rather
> than abuse. The reality is, these "problems" you are running into are not
> problems in practice, and the "solutions" you are used to, like braces,
> are visually noisy and not terribly effective. You would probably think
> differently of { } if they were spelled "BEGIN" and "END" like in Pascal.
>
> Braces have one, and only one, advantage: if you pass code through a
> noisy environment that deletes whitespace at will, you can recover the
> structure of the code from the braces. Python does not have that
> advantage, and sometimes it is a pain, e.g. when people email code using
> a broken mail client that deletes spaces.
>
> But then, if you passed C code through something that deleted the braces,
> you'd be royally screwed too. The solution to that is to stop having
> tools that think that whitespace isn't significant. Of course it is
> significant, it is significant to the human reader, who is about a
> hundred billion trillion times more important than the compiler.
>
>
>
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python Newbie Piterrr <piterrr.dolinski@gmail.com> - 2013-02-21 13:26 -0800
Re: Python Newbie Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-21 14:54 -0700
Re: Python Newbie MRAB <python@mrabarnett.plus.com> - 2013-02-21 21:58 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-22 08:59 +1100
Re: Python Newbie Peter Pearson <ppearson@nowhere.invalid> - 2013-02-21 22:03 +0000
Re: Python Newbie Dave Angel <davea@davea.name> - 2013-02-21 17:22 -0500
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-21 14:40 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-22 10:21 +1100
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-21 15:34 -0800
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-21 23:48 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-22 11:32 +1100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 11:58 -0700
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-21 15:34 -0800
Re: Python Newbie Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-21 23:27 +0000
Re: Python Newbie Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-21 16:55 -0700
Re: Python Newbie rusi <rustompmody@gmail.com> - 2013-02-21 22:57 -0800
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-22 10:26 +0000
Re: Python Newbie Steve Simmons <square.steve@gmail.com> - 2013-02-22 12:05 +0100
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-22 22:23 +1100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 16:04 -0700
Re: Python Newbie Vito De Tullio <vito.detullio@gmail.com> - 2013-02-24 09:23 +0100
Re: Python Newbie "J.R." <groups_jr-1@yahoo.com.br> - 2013-02-24 23:02 -0300
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 21:03 -0500
Re: Python Newbie "J.R." <groups_jr-1@yahoo.com.br> - 2013-02-24 23:35 -0300
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 13:31 +1100
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-21 19:35 -0500
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-21 23:50 -0500
Re: Python Newbie Rui Maciel <rui.maciel@gmail.com> - 2013-02-22 11:58 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-22 23:12 +1100
Re: Python Newbie Rui Maciel <rui.maciel@gmail.com> - 2013-02-22 13:50 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 01:05 +1100
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-23 00:03 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 11:21 +1100
Re: Python Newbie Duncan Booth <duncan.booth@invalid.invalid> - 2013-02-22 14:26 +0000
Re: Python Newbie Steve Simmons <square.steve@gmail.com> - 2013-02-22 15:45 +0100
Re: Python Newbie Duncan Booth <duncan.booth@invalid.invalid> - 2013-02-22 15:02 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 02:06 +1100
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-22 13:37 -0800
Re: Python Newbie Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-22 22:08 +0000
Re: Python Newbie Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-22 15:45 -0700
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-22 15:38 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 11:17 +1100
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-23 13:29 -0500
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-24 08:38 +1100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 15:52 -0700
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-24 10:18 +1100
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-23 15:46 -0800
Re: Python Newbie Larry Hudson <orgnut@yahoo.com> - 2013-02-23 20:20 -0800
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-24 14:34 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 07:46 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 02:52 +1100
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 11:22 -0500
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-24 17:44 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 11:29 -0800
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-24 21:35 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 14:43 -0800
Re: Python Newbie Joel Goldstick <joel.goldstick@gmail.com> - 2013-02-24 18:05 -0500
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-24 23:13 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 14:43 -0800
Re: Python Newbie Larry Hudson <orgnut@yahoo.com> - 2013-02-26 00:32 -0800
Re: Python Newbie rurpy@yahoo.com - 2013-02-26 10:23 -0800
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-26 10:59 -0800
Re: Python Newbie rurpy@yahoo.com - 2013-02-26 13:30 -0800
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-24 18:31 -0700
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 09:08 +1100
Re: Python Newbie Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-24 23:18 +0000
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-24 22:51 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 15:38 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 10:45 +1100
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-24 15:53 -0800
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 16:08 -0800
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-25 00:28 +0000
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-25 00:38 +0000
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-24 16:33 -0800
Re: Python Newbie Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-25 00:45 +0000
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 19:50 -0500
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-25 01:04 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 12:27 +1100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-24 18:42 -0700
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 12:24 +1100
Re: Python Newbie Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-25 01:44 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 12:53 +1100
Re: Python Newbie MRAB <python@mrabarnett.plus.com> - 2013-02-25 02:23 +0000
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-24 18:59 -0800
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 16:08 -0800
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 19:42 -0500
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 15:38 -0800
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-24 23:21 +0000
Re: Python Newbie Dave Angel <davea@davea.name> - 2013-02-24 17:47 -0500
Re: Python Newbie Serhiy Storchaka <storchaka@gmail.com> - 2013-02-25 14:40 +0200
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 07:46 -0800
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 22:23 -0700
Re: Python Newbie MRAB <python@mrabarnett.plus.com> - 2013-02-24 00:11 +0000
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-24 12:37 -0500
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-24 10:56 -0700
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 13:07 -0500
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-24 21:01 -0500
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-22 15:38 -0800
Re: Python Newbie Terry Reedy <tjreedy@udel.edu> - 2013-02-22 20:04 -0500
Re: Python Newbie rurpy@yahoo.com - 2013-02-22 18:48 -0800
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-22 20:47 -0500
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-23 02:02 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 13:18 +1100
Re: Python Newbie Grant Edwards <invalid@invalid.invalid> - 2013-02-24 18:19 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 07:25 +1100
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-22 21:40 -0500
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-23 13:48 +1100
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-23 02:59 +0000
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-23 13:34 -0500
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-24 08:40 +1100
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-24 12:41 -0500
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-23 04:13 +0000
Re: Python Newbie Serhiy Storchaka <storchaka@gmail.com> - 2013-02-23 11:48 +0200
Re: Python Newbie Rui Maciel <rui.maciel@gmail.com> - 2013-02-23 12:30 +0000
Re: Python Newbie Steve Simmons <square.steve@gmail.com> - 2013-02-23 16:43 +0100
Re: Python Newbie jmfauth <wxjmfauth@gmail.com> - 2013-02-23 10:44 -0800
Re: Python Newbie Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-23 12:13 -0700
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-23 11:08 -0800
Re: Python Newbie jmfauth <wxjmfauth@gmail.com> - 2013-02-23 12:53 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-24 08:48 +1100
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-24 00:02 +0000
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 12:16 -0700
Re: Python Newbie Matej Cepl <mcepl@redhat.com> - 2013-02-24 00:06 +0100
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-24 02:51 +1100
Re: Python Newbie Matej Cepl <mcepl@redhat.com> - 2013-02-24 00:04 +0100
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-23 08:32 -0800
Re: Python Newbie Steve Simmons <square.steve@gmail.com> - 2013-02-23 18:39 +0100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 12:19 -0700
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-24 17:11 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 11:40 -0800
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-24 15:06 -0500
Re: Python Newbie "Michael Ross" <gmx@ross.cx> - 2013-02-24 21:33 +0100
Re: Python Newbie MRAB <python@mrabarnett.plus.com> - 2013-02-24 20:34 +0000
Re: Python Newbie Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-24 20:41 +0000
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-24 12:34 -0800
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 07:42 +1100
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 15:48 -0500
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-24 21:58 +0000
Re: Python Newbie Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-24 21:08 -0500
Re: Python Newbie Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-25 02:59 +0000
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 07:47 +1100
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 07:58 +1100
Re: Python Newbie Roy Smith <roy@panix.com> - 2013-02-24 16:08 -0500
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 08:44 +1100
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-24 17:40 -0500
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-25 01:11 +0000
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-25 00:42 +0000
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-24 18:34 -0700
Re: Python Newbie Ethan Furman <ethan@stoneleaf.us> - 2013-02-24 14:33 -0800
Re: Python Newbie Albert Hopkins <marduk@letterboxes.org> - 2013-02-24 18:32 -0500
Re: Python Newbie Chris Angelico <rosuav@gmail.com> - 2013-02-25 10:44 +1100
Re: Python Newbie Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-25 01:06 +0000
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-24 11:40 -0800
Re: Python Newbie piterrr.dolinski@gmail.com - 2013-02-22 13:37 -0800
Re: Python Newbie Mitya Sirenef <msirenef@lightbird.net> - 2013-02-22 20:05 -0500
Re: Python Newbie Gene Heskett <gheskett@wdtv.com> - 2013-02-23 12:32 -0500
Re: Python Newbie Steve Simmons <square.steve@gmail.com> - 2013-02-23 19:10 +0100
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 11:40 -0700
Re: Python Newbie Michael Torrie <torriem@gmail.com> - 2013-02-23 12:15 -0700
Re: Python Newbie Gene Heskett <gheskett@wdtv.com> - 2013-02-23 17:49 -0500
Re: Python Newbie Nick Mellor <thebalancepro@gmail.com> - 2013-02-25 19:37 -0800
csiph-web