2008/12/9 Ethan Furman [EMAIL PROTECTED]:
Not all code has to be written for everyone. Not all code will be read by
the masses. Some code you write for yourself... an expression of who you
are, how you think...
While my own quirks are not as visually entertaining, I think it's another
On Mon, 08 Dec 2008 14:21:40 +, MRAB [EMAIL PROTECTED] wrote:
Jorgen Grahn wrote:
On Sat, 06 Dec 2008 10:01:10 +, Arnaud Delobelle [EMAIL PROTECTED]
wrote:
...
Why use (open, gzp.GzipFile)[Entry.endswith(.gz)] when we have had
contitional expressions for a few years now? Instead,
Lawrence D'Oliveiro wrote:
for \
Entry \
in \
sorted \
(
f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) != None
) \
:
Patch = (open, gzip.GzipFile)[Entry.endswith(.gz)](os.path.join(PatchesDir, Entry),
r)
... read from
On Sat, 06 Dec 2008 10:01:10 +, Arnaud Delobelle [EMAIL PROTECTED] wrote:
...
Why use (open, gzp.GzipFile)[Entry.endswith(.gz)] when we have had
contitional expressions for a few years now? Instead, you can write
(gzip.GzipFile if entry.endswidth(.gz) else open).
I think it will be
En Sun, 07 Dec 2008 05:34:39 -0200, Lawrence D'Oliveiro
[EMAIL PROTECTED] escribió:
In message [EMAIL PROTECTED], Arnaud Delobelle wrote:
* you give the impression of being arrogant;
Oddly enough, I wasn't the one who started by criticizing other people's
code. I have no ego about my
Jorgen Grahn a écrit :
(snip)
Also, making a decision based on the .gz part of the name isn't
always correct -- you miss files named foo.Z and similar.
.tgz anyone ?
/Jorgen
--
http://mail.python.org/mailman/listinfo/python-list
Jorgen Grahn wrote:
On Sat, 06 Dec 2008 10:01:10 +, Arnaud Delobelle [EMAIL PROTECTED] wrote:
...
Why use (open, gzp.GzipFile)[Entry.endswith(.gz)] when we have had
contitional expressions for a few years now? Instead, you can write
(gzip.GzipFile if entry.endswidth(.gz) else open).
En Sun, 07 Dec 2008 05:34:39 -0200, Lawrence D'Oliveiro
[EMAIL PROTECTED] escribió:
In message [EMAIL PROTECTED], Arnaud Delobelle wrote:
* you give the impression of being arrogant;
Oddly enough, I wasn't the one who started by criticizing other people's
code. I have no ego about my
Lawrence D'Oliveiro [EMAIL PROTECTED] writes:
In message [EMAIL PROTECTED], Arnaud Delobelle wrote:
* you seem to disregard the fact that in 'programming language' there
is the word 'language'. A language is a way to _communicate_
information, in the case of a programming language
On Sun, 07 Dec 2008 07:27:51 -, Lawrence D'Oliveiro
[EMAIL PROTECTED] wrote:
In message [EMAIL PROTECTED], Rhodri
James wrote:
Yes, it's very pretty, and you're terribly clever. In six months' time
when you come back to make some engineering change and have to sit down
and break it
Lawrence D'Oliveiro [EMAIL PROTECTED] writes:
In message [EMAIL PROTECTED], Aaron Brady wrote:
On Dec 5, 4:32 am, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
The code people write is probably a direct reflection of their thinking
processes: For example, slow,
On Sat, 06 Dec 2008 20:28:17 +1300 Lawrence D'Oliveiro
[EMAIL PROTECTED] wrote:
Does that make any sense to you, or should I start drawing simple
diagrams?
People, please! Is some civility too much to ask?
/W
--
My real email address is constructed by swapping the domain with the
recipient
On Dec 5, 7:20 pm, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
In message [EMAIL PROTECTED], Aaron Brady wrote:
On Dec 5, 4:32 am, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
The code people write is probably a direct reflection of their
On Sat, 06 Dec 2008 01:20:55 -, Lawrence D'Oliveiro
[EMAIL PROTECTED] wrote:
Do you find this
(open, gzip.GzipFile)[Entry.endswith(.gz)](os.path.join(PatchesDir,
Entry), r)
complicated or hard to understand? It's made up of very simple pieces,
combined according to very simple
In message [EMAIL PROTECTED], Rhodri
James wrote:
Yes, it's very pretty, and you're terribly clever. In six months' time
when you come back to make some engineering change and have to sit down
and break it back down into those simple pieces to remind yourself what
it's doing, pretty and
In message [EMAIL PROTECTED], Arnaud Delobelle wrote:
* you seem to disregard the fact that in 'programming language' there
is the word 'language'. A language is a way to _communicate_
information, in the case of a programming language you communicate
it to the computer but
In message [EMAIL PROTECTED], Arnaud Delobelle wrote:
* you give the impression of being arrogant;
Oddly enough, I wasn't the one who started by criticizing other people's
code. I have no ego about my code; I gladly accept criticisms. But perhaps
some other people are not so thick-skinned and
Lawrence D'Oliveiro wrote:
In message [EMAIL PROTECTED], Arnaud Delobelle wrote:
* you seem to disregard the fact that in 'programming language' there
is the word 'language'. A language is a way to _communicate_
information, in the case of a programming language you communicate
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote:
In message [EMAIL PROTECTED], Duncan Booth wrote:
Have you ever considered trying to write readable code instead?
(I must admit I haven't checked whether GZipFile works with the 'with'
statement...
That's why I prefer writing _correct_
In message [EMAIL PROTECTED], Steven D'Aprano
wrote:
On Fri, 05 Dec 2008 13:27:35 +1300, Lawrence D'Oliveiro wrote:
In message [EMAIL PROTECTED], Cong
Ma wrote:
The if ... != None is not necessary... if PatchDatePat.search(f)
is OK.
I don't do that.
Perhaps you should?
I prefer
In message [EMAIL PROTECTED], Steven D'Aprano
wrote:
... stupid formatting ...
withallthedifferenttermsruntogetherintoonelinesoyoudon'tknowwhereoneendsandtheotherbeginsifthat'showyouliketowritecodefinethat'snothowIliketodoit
--
http://mail.python.org/mailman/listinfo/python-list
In message [EMAIL PROTECTED], Steven D'Aprano
wrote:
Since the context has been deleted, it's hard to tell whether the code as
written by Lawrence ...
If you want to reply to my message, reply to my message, don't reply to my
reply to someone else's reply to my message.
--
In message [EMAIL PROTECTED], Duncan Booth wrote:
... but the mess you posted is going to be virtually untestable ...
The mess I posted did actually work as written.
... whereas splitting it up into small testable functions will make it
much easier for you to actually get somewhere near your
On Fri, 05 Dec 2008 23:28:48 +1300, Lawrence D'Oliveiro wrote:
In message [EMAIL PROTECTED], Steven D'Aprano
wrote:
Since the context has been deleted, it's hard to tell whether the code
as written by Lawrence ...
If you want to reply to my message, reply to my message, don't reply to
On Fri, 05 Dec 2008 23:32:49 +1300, Lawrence D'Oliveiro wrote:
In message [EMAIL PROTECTED], Duncan Booth wrote:
... but the mess you posted is going to be virtually untestable ...
The mess I posted did actually work as written.
... whereas splitting it up into small testable functions
On Fri, 05 Dec 2008 23:16:08 +1300, Lawrence D'Oliveiro wrote:
In message [EMAIL PROTECTED], Steven D'Aprano
wrote:
On Fri, 05 Dec 2008 13:27:35 +1300, Lawrence D'Oliveiro wrote:
In message [EMAIL PROTECTED], Cong
Ma wrote:
The if ... != None is not necessary... if
Steven D'Aprano wrote:
Gosh Lawrence, do tell, which category do YOU fall into?
I suppose a mix-up between a cowbody (or Fonzie) coder and a troll.
His programs have an inner poetry that we're obviously too stupid to
understand.
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 5, 8:06 am, Marco Mariani [EMAIL PROTECTED] wrote:
Steven D'Aprano wrote:
Gosh Lawrence, do tell, which category do YOU fall into?
I suppose a mix-up between a cowbody (or Fonzie) coder and a troll.
Naah.. more likely an (ex?) Lisper/Schemer.
--
On Dec 5, 4:32 am, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
The code people write is probably a direct reflection of their thinking
processes: For example, slow, plodding, one step at a time, incapable of
imaginative leaps, versus those who operate directly on larger
In message [EMAIL PROTECTED], Aaron Brady wrote:
On Dec 5, 4:32 am, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
The code people write is probably a direct reflection of their thinking
processes: For example, slow, plodding, one step at a time, incapable of
On Dec 3, 8:07 pm, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
snip code
Originally, like many others here I said YIKES! but on a second read,
it is not that bad. It actually grows on you.
After looking at it one more time I found it neat, very concise
without being
On Fri, 05 Dec 2008 20:19:22 -0800, Istvan Albert wrote:
On Dec 3, 8:07 pm, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
snip code
Originally, like many others here I said YIKES! but on a second read, it
is not that bad. It actually grows on you.
Just like a
In message [EMAIL PROTECTED], Steven D'Aprano
wrote:
On Fri, 05 Dec 2008 23:28:48 +1300, Lawrence D'Oliveiro wrote:
In message [EMAIL PROTECTED], Steven D'Aprano
wrote:
Since the context has been deleted, it's hard to tell whether the code
as written by Lawrence ...
If you want to
In message [EMAIL PROTECTED], Steven D'Aprano
wrote:
It would have been far more concise ...
Gee, I thought people were complaining it was too cryptic, now it turns out
they were actually complaining because it was too verbose.
--
http://mail.python.org/mailman/listinfo/python-list
In message
[EMAIL PROTECTED], Istvan
Albert wrote:
Originally, like many others here I said YIKES! but on a second read,
it is not that bad. It actually grows on you.
After looking at it one more time I found it neat, very concise
without being unreadable.
The key thing is, it's
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote:
for \
Entry \
in \
sorted \
(
f for f in os.listdir(PatchesDir) if
PatchDatePat.search(f) != None
) \
:
Patch = (open,
Lawrence D'Oliveiro wrote:
for \
Entry \
in \
sorted \
(
f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) !=
None
) \
:
Patch = (open,
gzip.GzipFile)[Entry.endswith(.gz)](os.path.join(PatchesDir, Entry), r)
...
On Dec 4, 10:39 am, Cong Ma [EMAIL PROTECTED] wrote:
Lawrence D'Oliveiro wrote:
for \
Entry \
in \
sorted \
(
f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) !=
None
) \
:
Patch = (open,
In message [EMAIL PROTECTED], Duncan Booth wrote:
Have you ever considered trying to write readable code instead?
(I must admit I haven't checked whether GZipFile works with the 'with'
statement...
That's why I prefer writing _correct_ code instead.
--
In message [EMAIL PROTECTED], Cong Ma
wrote:
The if ... != None is not necessary... if PatchDatePat.search(f) is
OK.
I don't do that.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 05 Dec 2008 13:27:35 +1300, Lawrence D'Oliveiro wrote:
In message [EMAIL PROTECTED], Cong
Ma wrote:
The if ... != None is not necessary... if PatchDatePat.search(f)
is OK.
I don't do that.
Perhaps you should?
Since the context has been deleted, it's hard to tell whether the
for \
Entry \
in \
sorted \
(
f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) != None
) \
:
Patch = (open,
gzip.GzipFile)[Entry.endswith(.gz)](os.path.join(PatchesDir, Entry), r)
... read from Patch ...
Patch.close()
#end
uggh no!
On Thu, Dec 4, 2008 at 11:07 AM, Lawrence D'Oliveiro
[EMAIL PROTECTED] wrote:
for \
Entry \
in \
sorted \
(
f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) != None
) \
:
Patch = (open,
43 matches
Mail list logo