Re: Suggested coding style

2011-10-03 Thread Stephen Hansen
On 9/30/11 6:54 AM, rantingrick wrote: > a misplaced and rarely used functionality of the stdlib. Have you tried putting "\.zfill\(" and selecting Python in google.com/codesearch? It seems to have quite a few users, among only openly available code. Considering there is a much larger body of code

Re: Suggested coding style

2011-09-30 Thread alex23
> > On Sep 29, 10:23 pm, rantingrick wrote: > > > What is so bad about breaking code in obscure places? > On Sep 29, 9:50 pm, alex23 wrote: > > Try coding in PHP across minor release versions and see how you feel > > about deprecating core functions on a whim. On Sep 30, 11:54 pm, rantingrick

Re: Suggested coding style

2011-09-30 Thread Alec Taylor
Meh, so run your own web-server. If wave isn't right, search on sourceforge for a while. On 10/1/11, Prasad, Ramit wrote: >>> The answer to any news/mail client with feature X type question is >>> normally "gnus" - although I don't know what "Gmail-like style" is. >>Yeah > > Gah, I got distracte

RE: Suggested coding style

2011-09-30 Thread Prasad, Ramit
>> The answer to any news/mail client with feature X type question is >> normally "gnus" - although I don't know what "Gmail-like style" is. >Yeah Gah, I got distracted mid-email and forgot to finish. What I wanted to say was, "Yeah, not knowing what 'Gmail-like style' makes a big difference ;)"

RE: Suggested coding style

2011-09-30 Thread Prasad, Ramit
May I suggest a[n] email client that can group mailing list threads? > The answer to any news/mail client with feature X type question is > normally "gnus" - although I don't know what "Gmail-like style" is. Yeah >slrn. Is good. Unless I am missing something, it does not do email. >http://in

Re: Suggested coding style

2011-09-30 Thread Alec Taylor
http://incubator.apache.org/wave/ On 10/1/11, Neil Cerutti wrote: > On 2011-09-30, Paul Rudin wrote: >> "Prasad, Ramit" writes: >> May I suggest a[n] email client that can group mailing list threads? >>> >>> Please do. Bonus points if it handles threading in a Gmail-like style. >> >> The an

Re: Suggested coding style

2011-09-30 Thread Neil Cerutti
On 2011-09-30, Paul Rudin wrote: > "Prasad, Ramit" writes: > >>>May I suggest a[n] email client that can group mailing list threads? >> >> Please do. Bonus points if it handles threading in a Gmail-like style. > > The answer to any news/mail client with feature X type question is > normally "gnus

Re: Suggested coding style

2011-09-30 Thread Alec Taylor
Maybe one Apache's Buzz? On 10/1/11, Prasad, Ramit wrote: >>> Please do. Bonus points if it handles threading in a Gmail-like style. >>> >> >>May I suggest Gmail? It handles threading in a very Gmail-like style. > > Curses, foiled by my lack of specificity! I meant desktop client. > Although...if

Re: Suggested coding style

2011-09-30 Thread Paul Rudin
"Prasad, Ramit" writes: >>May I suggest a[n] email client that can group mailing list threads? > > Please do. Bonus points if it handles threading in a Gmail-like style. The answer to any news/mail client with feature X type question is normally "gnus" - although I don't know what "Gmail-like st

Re: Suggested coding style

2011-09-30 Thread Chris Angelico
On Sat, Oct 1, 2011 at 3:05 AM, Prasad, Ramit wrote: > Curses, foiled by my lack of specificity! I meant desktop client. > Although...if another website does similar threading it would be good to > know. Never know when I will want to start avoiding Gmail :) > Ah, *desktop* client! Hm. I actual

RE: Suggested coding style

2011-09-30 Thread Prasad, Ramit
>> Please do. Bonus points if it handles threading in a Gmail-like style. >> > >May I suggest Gmail? It handles threading in a very Gmail-like style. Curses, foiled by my lack of specificity! I meant desktop client. Although...if another website does similar threading it would be good to know. Ne

Re: Suggested coding style

2011-09-30 Thread Chris Angelico
On Sat, Oct 1, 2011 at 2:06 AM, Prasad, Ramit wrote: >>May I suggest a[n] email client that can group mailing list threads? > > Please do. Bonus points if it handles threading in a Gmail-like style. > May I suggest Gmail? It handles threading in a very Gmail-like style. ChrisA running and duckin

RE: Suggested coding style

2011-09-30 Thread Prasad, Ramit
423 -Original Message- From: python-list-bounces+ramit.prasad=jpmorgan@python.org [mailto:python-list-bounces+ramit.prasad=jpmorgan@python.org] On Behalf Of Devin Jeanpierre Sent: Thursday, September 29, 2011 6:07 PM To: rantingrick Cc: python-list@python.org Subject: Re: Suggested coding st

Re: Suggested coding style

2011-09-30 Thread Chris Angelico
On Fri, Sep 30, 2011 at 11:54 PM, rantingrick wrote: > Well "alex", like yourself, i hold expertise in many fields BESIDES > programming. One of which being psychology. > I *knew* it! We're all part of a huge experiment to see how much the human psyche can withstand. If we succeed on the Rick tes

Re: Suggested coding style

2011-09-30 Thread rantingrick
Note: I am quoting "Passiday" to get this thread back on subject however my reply is for "alex23" the philosopher" On Sep 29, 9:50 pm, alex23 wrote: > On Sep 29, 10:23 pm, rantingrick wrote: > > > What is so bad about breaking code in obscure places? > > Try coding in PHP across minor release ve

Re: Suggested coding style

2011-09-30 Thread rantingrick
On Sep 29, 11:49 pm, Ian Kelly wrote: > Nope, that doesn't work. > > >>> "{0:0>10}".format("-1234") > > '0-1234' > > The whole point of zfill is that it handles signs correctly. py> "{0:-010d}".format(-1234) '-01234' My point was: Use the {char}{repeat}d format for integers and the {char

Re: Suggested coding style

2011-09-29 Thread Chris Angelico
On Fri, Sep 30, 2011 at 4:14 PM, Westley Martínez wrote: > I'm one of the weirdos who is absolutely hostile to the format method > and continues to use % formatting.  I'm pretty sure it is because of my > C background (actually I learned Python before C, and thus learned % > formatting in Python).

Re: Suggested coding style

2011-09-29 Thread Westley Martínez
On Thu, Sep 29, 2011 at 07:07:28PM -0400, Devin Jeanpierre wrote: > > However, as you use the new format method you will come to appreciate > > it. It's an adult beverage with an acquired taste. ;-) > > Yeah. It's a much more difficult to read thing, but once you learn how > to write it it flows f

Re: Suggested coding style

2011-09-29 Thread alex23
On Sep 30, 3:14 pm, Ben Finney wrote: > alex23 writes: > > On Sep 29, 10:23 pm, rantingrick wrote: > > > GvR should be texting me every night in hopes that some of my API > > > genius will rub off on him. > > > Are you off your medication again? > > Please don't make personal attacks. If you don

Re: Suggested coding style

2011-09-29 Thread Ben Finney
alex23 writes: > On Sep 29, 10:23 pm, rantingrick wrote: > > GvR should be texting me every night in hopes that some of my API > > genius will rub off on him. > > Are you off your medication again? Please don't make personal attacks. If you don't feel like addressing the content of his message

Re: Suggested coding style

2011-09-29 Thread Ian Kelly
On Thu, Sep 29, 2011 at 4:56 PM, rantingrick wrote: >> Agree that zfill seems to be redundant with str.format, although your >> suggested syntax is atrocious, especially since a syntax already >> exists that fits better in the already-complicated format specifier >> syntax. > > It's interesting th

Re: Suggested coding style

2011-09-29 Thread Ian Kelly
On Thu, Sep 29, 2011 at 5:47 PM, rantingrick wrote: > Ah ha! Found the answer! > > py> "{0:010d}".format(1234) > 001234 > > py> "{0:0>10}".format(1234) > 001234 > > py> "{0:0>10}".format("1234") > 001234 > > py> "{0:@>10}".format("1234") > @@1234 > > I would skip using the "{int}{r

Re: Benefit and belief [was Re: Suggested coding style]

2011-09-29 Thread alex23
Dennis Lee Bieber wrote: >         Well... We could try for equality in offense -- the Torah or the > Koran? Maybe the Tripitaka or Sutras? I always enjoyed the possibly apocryphal claim that the design of VRML was influenced by the story of Indra's Net. Maybe some religious tomes are just better

Re: Suggested coding style

2011-09-29 Thread Chris Angelico
On Fri, Sep 30, 2011 at 12:50 PM, alex23 wrote: >> GvR should be texting me every night in hopes that some of my API genius >> will rub >> off on him. > > Are you off your medication again? > He's very much like jimontrack (aka Tranzit Jim - google him if you're curious), whose username people f

Re: Suggested coding style

2011-09-29 Thread rantingrick
On Sep 29, 5:12 pm, Ian Kelly wrote: > On Thu, Sep 29, 2011 at 6:23 AM, rantingrick wrote: > > A specific method for padding a string with ONLY zeros is ludicrous > > and exposes the narrow mindedness of the creator. The only thing worse > > than "zfill" as a string method is making zfill into bu

Re: Suggested coding style

2011-09-29 Thread rantingrick
On Sep 29, 6:07 pm, Devin Jeanpierre wrote: > > However, as you use the new format method you will come to appreciate > > it. It's an adult beverage with an acquired taste. ;-) > > Yeah. It's a much more difficult to read thing, but once you learn how > to write it it flows faster. > > Of course,

Re: Suggested coding style

2011-09-29 Thread Devin Jeanpierre
> However, as you use the new format method you will come to appreciate > it. It's an adult beverage with an acquired taste. ;-) Yeah. It's a much more difficult to read thing, but once you learn how to write it it flows faster. Of course, I never managed to learn how to write it... I would sugg

Re: Suggested coding style

2011-09-29 Thread rantingrick
On Sep 29, 5:12 pm, Ian Kelly wrote: > On Thu, Sep 29, 2011 at 6:23 AM, rantingrick wrote: > > A specific method for padding a string with ONLY zeros is ludicrous > > and exposes the narrow mindedness of the creator. The only thing worse > > than "zfill" as a string method is making zfill into bu

Re: Suggested coding style

2011-09-29 Thread Ian Kelly
On Thu, Sep 29, 2011 at 6:23 AM, rantingrick wrote: > A specific method for padding a string with ONLY zeros is ludicrous > and exposes the narrow mindedness of the creator. The only thing worse > than "zfill" as a string method is making zfill into built-in > function! The ONLY proper place for z

Re: Suggested coding style

2011-09-29 Thread Ben Finney
Passiday writes: > Oh, my. Who could expect this topic would iterate to some whining > about religion (please don't respond on this remark of mine). That's an unreasonable request. If you make a provocative remark (I doubt you chose to use “whining” without knowing how dismissive it is), it's di

Re: Suggested coding style

2011-09-29 Thread Chris Angelico
On Fri, Sep 30, 2011 at 2:42 AM, Westley Martínez wrote: > But maybe I'm just batty as you all think I am. Yes, I'm afraid so. Bonkers. Off your head. But let me tell you a secret... All the best people are. > Well, I once thought that a print function made a lot of sense.  In C, > printf is a f

Re: Suggested coding style

2011-09-29 Thread Westley Martínez
On Thu, Sep 29, 2011 at 05:23:30AM -0700, rantingrick wrote: > On Sep 29, 5:37 am, Passiday wrote: > > What is so bad about breaking code in obscure places? We changed print > to a function which broke just about every piece of code every written > in this language. (BTW, print should ALWAYS hav

Re: Suggested coding style

2011-09-29 Thread Westley Martínez
On Thu, Sep 29, 2011 at 08:37:53PM +1000, Steven D'Aprano wrote: > Westley Martínez wrote: > > > Perhaps you should spend a little less time on the mailing list and a > > little more time in church. > > Is that meant as punishment for Rick or for the churchgoers? > > Hopefully neither, probabl

Re: Suggested coding style

2011-09-29 Thread rantingrick
On Sep 29, 7:23 am, rantingrick wrote: > A specific method for padding a string with ONLY zeros is ludicrous > and exposes the narrow mindedness of the creator. The only thing worse > than "zfill" as a string method is making zfill into built-in > function! The ONLY proper place for zfill is as a

Re: Suggested coding style

2011-09-29 Thread rantingrick
point of all this, yes. You see, around here, once the point is made there is an unwritten rule that the thread must then descend into chaos. However, it seems you "may" have brought this train wreck back to reality below... whether the trolls will allow that happen remains to be seen...?

Re: Suggested coding style

2011-09-29 Thread Passiday
some good guidelines: http://www.python.org/dev/peps/pep-0008 My topic was "Suggested coding style" because I hoped there is some common understanding which of the ancient methods/functions are so not where they should be that the use of them should be depreciated. I can fully under

Re: Suggested coding style

2011-09-29 Thread Steven D'Aprano
Westley Martínez wrote: > Perhaps you should spend a little less time on the mailing list and a > little more time in church. Is that meant as punishment for Rick or for the churchgoers? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggested coding style

2011-09-29 Thread Ian Kelly
On Thu, Sep 29, 2011 at 12:57 AM, Ian Kelly wrote: > On Thu, Sep 29, 2011 at 12:24 AM, Westley Martínez wrote: >> Perhaps you should spend a little less time on the mailing list and a >> little more time in church. > > You must not like churchgoers very much if you want to inflict > rantingrick o

Re: Suggested coding style

2011-09-29 Thread Ian Kelly
On Thu, Sep 29, 2011 at 12:24 AM, Westley Martínez wrote: > Perhaps you should spend a little less time on the mailing list and a > little more time in church. You must not like churchgoers very much if you want to inflict rantingrick on them... -- http://mail.python.org/mailman/listinfo/python-

Re: Suggested coding style

2011-09-28 Thread Westley Martínez
On Wed, Sep 28, 2011 at 07:11:08PM -0700, rantingrick wrote: > On Sep 28, 6:26 pm, Tim Johnson wrote: > > * DevPlayer [110928 04:31]: > > > On Sep 27, 10:25 pm, alex23 wrote: > > > > rantingrick wrote: > > > > > Since, like the bible > > > > > the zen is self contradicting, any argument utilizi

Re: Suggested coding style

2011-09-28 Thread alex23
On Sep 28, 10:12 pm, DevPlayer wrote: > Calling the Bible a joke is used to hurt people, not enlighten them. Y'know, I wouldn't even bother responding to this if Xianists were as open, forgiving and accepting as their messiah told them to be. It was a *flippant remark*. If you want to establish i

Re: Suggested coding style

2011-09-28 Thread DevPlayer
etter: Suggested coding style Options -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggested coding style

2011-09-28 Thread rantingrick
On Sep 28, 6:26 pm, Tim Johnson wrote: > * DevPlayer [110928 04:31]: > > On Sep 27, 10:25 pm, alex23 wrote: > > > rantingrick wrote: > > > > Since, like the bible > > > > the zen is self contradicting, any argument utilizing the zen can be > > > > defeated utilizing the zen. > > > > And like th

Re: [OT] Benefit and belief [was Re: Suggested coding style]

2011-09-28 Thread Devin Jeanpierre
> Forget money, or even the love of money. The idea that one mustn't > criticise another person's beliefs is the root of all evil. This was a technical discussion, and calling the bible a joke was not necessary at all. It creates a hostile atmosphere. Can't you pick somewhere else to attack Chris

[OT] Benefit and belief [was Re: Suggested coding style]

2011-09-28 Thread Steven D'Aprano
DevPlayer wrote: > On Sep 27, 10:25 pm, alex23 wrote: >> And like the Bible, the Zen was created by humans as a joke. If you're >> taking it too seriously, that's your problem. [...] > Calling the Bible a joke is used to hurt people, not enlighten them. > Those words show bitter arrogance, not co

Re: Suggested coding style

2011-09-28 Thread Tim Johnson
* DevPlayer [110928 04:31]: > On Sep 27, 10:25 pm, alex23 wrote: > > rantingrick wrote: > > > Since, like the bible > > > the zen is self contradicting, any argument utilizing the zen can be > > > defeated utilizing the zen. > > > > And like the Bible, the Zen was created by humans as a joke. If

Re: Suggested coding style

2011-09-28 Thread Ben Finney
DevPlayer writes: > Calling the Bible a joke is used to hurt people, not enlighten them. How do you know that? > Those words show bitter arrogance, not constructive critism How do you know that? > as it ignores how others feel about that book. That strikes me as a good thing; how people feel

Re: Suggested coding style

2011-09-28 Thread DevPlayer
On Sep 27, 10:25 pm, alex23 wrote: > rantingrick wrote: > > Since, like the bible > > the zen is self contradicting, any argument utilizing the zen can be > > defeated utilizing the zen. > > And like the Bible, the Zen was created by humans as a joke. If you're > taking it too seriously, that's y

Re: Suggested coding style

2011-09-27 Thread alex23
rantingrick wrote: > Since, like the bible > the zen is self contradicting, any argument utilizing the zen can be > defeated utilizing the zen. And like the Bible, the Zen was created by humans as a joke. If you're taking it too seriously, that's your problem. > If however you want to learn abou

Re: Suggested coding style

2011-09-27 Thread rantingrick
On Sep 27, 1:51 am, DevPlayer wrote: > By the way OP Passiday the title of the topic is "Suggested coding > style". > > Are you suggesting a coding style or asking for a Python coding style > or are you asking what IS the Python coding style. > > If you are asking

Re: Suggested coding style

2011-09-26 Thread DevPlayer
By the way OP Passiday the title of the topic is "Suggested coding style". Are you suggesting a coding style or asking for a Python coding style or are you asking what IS the Python coding style. If you are asking what is the Python coding style. Google The Zen of Python. It's

Re: Suggested coding style

2011-09-26 Thread DevPlayer
On Sep 25, 11:41 pm, Chris Angelico wrote: > On Mon, Sep 26, 2011 at 12:59 PM, Tim Johnson wrote: > > BTW: If you like ranting as a spectator sport, I have found the > >  Common Lisp newsgroup to be among the most spectacular. But that's > >  just me. > > I do, actually, but I don't need to add a

Re: Suggested coding style

2011-09-25 Thread Chris Angelico
On Mon, Sep 26, 2011 at 12:59 PM, Tim Johnson wrote: > BTW: If you like ranting as a spectator sport, I have found the >  Common Lisp newsgroup to be among the most spectacular. But that's >  just me. > I do, actually, but I don't need to add another newsgroup. Rick provides plenty of material he

Re: Suggested coding style

2011-09-25 Thread Tim Johnson
* Chris Angelico [110925 13:50]: > On Mon, Sep 26, 2011 at 4:54 AM, Petite Abeille > wrote: > > > > On Sep 25, 2011, at 8:46 PM, Tim Johnson wrote: > > > >>  Why does it suck? And why do people say 'suck' so much, especially in > >> technical venues? :) > > > > It's a technical term: > > > > htt

Re: Suggested coding style

2011-09-25 Thread Tim Johnson
* Devin Jeanpierre [110925 16:37]: > > Why does it suck? > > The gist of what I was saying is that it's possible to define > functions that do this "generically" so that one implementation of > zfill can work with multiple implementations of strings. That is kind of 'spot on' for me. Before

Re: Suggested coding style

2011-09-25 Thread Chris Angelico
On Mon, Sep 26, 2011 at 10:23 AM, Devin Jeanpierre wrote: >> Also, because technical people are opinionated windbags. > > Pardon? No offense intended; just look at this list and you'll see how opinionated people can be, and how willing to express those opinions in many words! Frank and courteous

Re: Suggested coding style

2011-09-25 Thread Devin Jeanpierre
> I would have thought that a better solution would be to specify a > minimal set of methods in an abstract superclass and write the > additional methods using that minimal set. > > The concrete string implementations would be descended from the > superclass and would still be able to override the

Re: Suggested coding style

2011-09-25 Thread MRAB
On 26/09/2011 01:23, Devin Jeanpierre wrote: Why does it suck? The gist of what I was saying is that it's possible to define functions that do this "generically" so that one implementation of zfill can work with multiple implementations of strings. Having to reimplement every time when one im

Re: Suggested coding style

2011-09-25 Thread Devin Jeanpierre
> Why does it suck? The gist of what I was saying is that it's possible to define functions that do this "generically" so that one implementation of zfill can work with multiple implementations of strings. Having to reimplement every time when one implementation would do is bothersome and general

Re: Suggested coding style

2011-09-25 Thread Arnaud Delobelle
On Sep 25, 2011 10:49 PM, "Chris Angelico" wrote: > And if you're willing to learn, it's not uncommon to start off > complaining and end up appreciating. :) +1 QOTW -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggested coding style

2011-09-25 Thread Chris Angelico
On Mon, Sep 26, 2011 at 4:54 AM, Petite Abeille wrote: > > On Sep 25, 2011, at 8:46 PM, Tim Johnson wrote: > >>  Why does it suck? And why do people say 'suck' so much, especially in >> technical venues? :) > > It's a technical term: > > http://www.osnews.com/images/comics/wtfm.jpg Also, because

Re: Suggested coding style

2011-09-25 Thread Petite Abeille
On Sep 25, 2011, at 8:46 PM, Tim Johnson wrote: > Why does it suck? And why do people say 'suck' so much, especially in > technical venues? :) It's a technical term: http://www.osnews.com/images/comics/wtfm.jpg -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggested coding style

2011-09-25 Thread Tim Johnson
* Devin Jeanpierre [110924 19:07]: > > Padding numbers with leading zeroes is very common. I'm surprised that > > more languages don't make it a string method. > > By making it a string method, instead of a function, we force all > implementations of strings to implement that method. That sort of

Re: Suggested coding style

2011-09-24 Thread Devin Jeanpierre
> Padding numbers with leading zeroes is very common. I'm surprised that > more languages don't make it a string method. By making it a string method, instead of a function, we force all implementations of strings to implement that method. That sort of sucks, and it's a reason not to include it as

Re: Suggested coding style

2011-09-24 Thread Steven D'Aprano
MRAB wrote: > On 24/09/2011 20:10, Tim Johnson wrote: >> * Passiday [110924 09:47]: >> <...> >>> I have been coding in many other languages, most of the time it was >>> Java and C#. I don't like the function mess of PHP (ie, loads and >>> loads of functions without any namespaces etc), but I'd li

Re: Suggested coding style

2011-09-24 Thread Tim Johnson
* Arnaud Delobelle [110924 12:04]: > On 24 September 2011 20:34, MRAB wrote: > > >>> In my brief coding experience I have stumbled upon Python zfill(width) > >>> method, > [...] > >>   It could be some sort of legacy. I imagine we will hear from some > >>   more senior pythonists on this matter.

Re: Suggested coding style

2011-09-24 Thread Arnaud Delobelle
On 24 September 2011 20:34, MRAB wrote: >>> In my brief coding experience I have stumbled upon Python zfill(width) >>> method, [...] >>   It could be some sort of legacy. I imagine we will hear from some >>   more senior pythonists on this matter. >> > The documentation says "New in version 2.2.2

Re: Suggested coding style

2011-09-24 Thread MRAB
On 24/09/2011 20:10, Tim Johnson wrote: * Passiday [110924 09:47]: <...> I have been coding in many other languages, most of the time it was Java and C#. I don't like the function mess of PHP (ie, loads and loads of functions without any namespaces etc), but I'd like to think that Python is dif

Re: Suggested coding style

2011-09-24 Thread Tim Johnson
* Passiday [110924 09:47]: <...> > I have been coding in many other languages, most of the time it was > Java and C#. I don't like the function mess of PHP (ie, loads and > loads of functions without any namespaces etc), but I'd like to think > that Python is different. It is ... > In my brief

Re: Suggested coding style

2011-09-24 Thread MRAB
On 24/09/2011 18:31, Passiday wrote: Hello, I have started to code random stuff in Python only recently, still lots to learn. So please bear with me if my question sounds like rant. I have been coding in many other languages, most of the time it was Java and C#. I don't like the function mess o

Suggested coding style

2011-09-24 Thread Passiday
Hello, I have started to code random stuff in Python only recently, still lots to learn. So please bear with me if my question sounds like rant. I have been coding in many other languages, most of the time it was Java and C#. I don't like the function mess of PHP (ie, loads and loads of functions