PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
The interface for these modules is not intuitive. Instead of creating true OOP objects we have lists and strings. Any calendar object should expose string names of both: days of the week and months of the year. It seems one (or possibly more) of the three expose this important info however i cannot

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 1:01 pm, Devin Jeanpierre wrote: > What's "horrendous" about the datetime module interface? Your listed > complaints (OOP etc.) don't seem to have anything to do with it. Well my immediate complaint about date-time is actually a problem with the syntactic quandaries of the Python lang

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 1:23 pm, Rick Johnson wrote: >   def $method(self):pass >   self.@instanceveriable >   self.@@classvariable Actually, class level methods can be accessed through ClassIdentifier.method, and instance methods through instanceidentifier.instancemethod. So decorating methods bec

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 2:58 pm, Evan Driscoll wrote: > On 01/14/2012 02:11 PM, Devin Jeanpierre wrote: > It also has some problems. For instance, if an object has a member which > is a type that implements __call__ but is also useful to access "on its > own", is that a field or a function? Can you site a re

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 10:23 pm, Steven D'Aprano wrote: > This is not Java, and we prefer Python terminology. > > A variable holding an int is an int variable. > A variable holding a string is a string variable. > A variable holding a list is a list variable. > A variable holding an instance is an instance v

Re: First python project : Tuner

2012-01-17 Thread Rick Johnson
On Jan 17, 8:16 am, Jérôme wrote: > Any comment is welcome, be it about code optimization, coding style, > pythonification, good practices, or simply program features and usability. Step one would be to show a screen shot in both English AND French language. Besides, not everyone in this communi

Re: First python project : Tuner

2012-01-17 Thread Rick Johnson
On Jan 17, 1:38 pm, Ben Finney wrote: > Jérôme writes: > > Rick Johnson a écrit: > > > Besides, not everyone in this community is a "card carrying" > > > pacifist. > > ? > You have attracted the attention of a troll. What is worse: A wolf, or a wo

Re: THAT WHAT NEED EXPECT FROM OPERATORS OF PYTHON. (e-mail get by the list moderator)

2012-01-17 Thread Rick Johnson
On Jan 16, 12:03 am, "_" wrote: > # THAT WHAT NEED EXPECT FROM OPERATORS OF PYTHON: > Worddr = "56" # CREATE A STRING: "56" > Word = ["12"] # CREATE A LIST WITH ONE SIGNED: "12" > Word = Word.append("34") # APPEND TO LIST ONE MORE SIGNED: "34" > Word = Word + "34" # MUST APPEND TO LIST ONE MORE SI

Re: Please don't use "setuptools", the "rotten .egg" install system.

2012-01-18 Thread Rick Johnson
On Jan 18, 12:24 pm, John Nagle wrote: >    Please don't use "setuptools", the so-called "easy" > installation system in your packages.  It just makes things > more complicated, adds dependencies, and needs too many weird > options if things aren't exactly where it wants them.  Since > "setuptools

Re: First python project : Tuner

2012-01-19 Thread Rick Johnson
On Jan 19, 4:44 am, Jérôme wrote: > - Most importantly, new 2.1 version comes with an absolutely pure french-free >   english-only screenshot, for your convenience. Thanks for this update. However, i need to stress that while the English language is fundamental to writing Python code, we are not

Re: can some one help me with my code. thanks

2012-01-20 Thread Rick Johnson
On Jan 20, 12:49 pm, Tamanna Sultana wrote: > > If you can give me some lead to fix the code I wrote below that will be > > great: Your variable names need a bit more thought > def average(bin): What is a "bin"? Maybe you shoulc have called this a "lst" eh? >     num=[] Why would you call a l

Looking under Python's hood: Will we find a high performance or clunky engine?

2012-01-22 Thread Rick Johnson
What does Python do when presented with this code? py> [line.strip('\n') for line in f.readlines()] If Python reads all the file lines first and THEN iterates AGAIN to do the strip; we are driving a Fred flintstone mobile. If however Python strips each line of the lines passed into readlines in

Re: Trouble with internationalized path under windows

2012-01-22 Thread Rick Johnson
On Jan 22, 2:08 pm, Jacob Hallén wrote: > If I store these two files  in say C:\Users\Admin\test everything works fine. > > If I store them in C:\Users\Admin\testф, I get an import error when running > foo.py. The letter at the end of test is a Russian "F", if it looks strange on > your terminal.

Re: Looking under Python's hood: Will we find a high performance or clunky engine?

2012-01-22 Thread Rick Johnson
On Jan 22, 6:38 pm, Michael Torrie wrote: > On 01/22/2012 08:50 AM, Rick Johnson wrote: > > > > > What does Python do when presented with this code? > > > py> [line.strip('\n') for line in f.readlines()] > > > If Python reads all the file lines

Re: Trouble with internationalized path under windows

2012-01-22 Thread Rick Johnson
On Jan 22, 6:47 pm, Michael Torrie wrote: > I once argued to limit Python identifiers to latin letters only, but at > least that made some sort of sense (lowest-common denominator) and it > had nothing to do with running in an internationalized environment or > dealing with unicode or utf-8 -encod

Re: Please provide a better explanation of tuples and dictionaries

2013-02-02 Thread Rick Johnson
# Quote: Daniel Rouse Jr. # # To me, this looks like an array. Is tuple just the # # Python name for an array?

Re: best way to share an instance of a class among modules?

2013-02-07 Thread Rick Johnson
On Wednesday, February 6, 2013 7:36:28 PM UTC-6, Ethan Furman wrote: > As Michael Torrie pointed out, the 'global' keyword is needed: Wrong. The global keyword is in fact NOT needed and something i consider to be another wart of the language (PyWart on this subject coming soon!). Now, whilst Mi

PyWart: Namespace asinitiy and the folly of the global statement

2013-02-07 Thread Rick Johnson
Python's use of namespaces is, as we all quite know, "one honking great idea!"; and i must wholeheartedly agree, however, accessing and declaring variables living in python namespaces is a kludge at best, and a malevolent obfuscation at worst!

Re: Implicit conversion to boolean in if and while statements

2013-02-07 Thread Rick Johnson
On Monday, July 16, 2012 7:43:47 PM UTC-5, Steven D'Aprano wrote: > > [...] > > If I insist on making a single object do duty for both the jar and the > jellybean count, then I need a "null jar object", and I probably end up > with something like this: > > Jar(number_of_beans=None) => null ja

Re: Implicit conversion to boolean in if and while statements

2013-02-07 Thread Rick Johnson
On Monday, July 16, 2012 8:45:51 PM UTC-5, rusi wrote: > On Jul 15, 9:50 pm, Rick Johnson wrote: > > I think this issue is not so much a "bool test" vs "type > > test", but more an ambiguous syntax issue. > > > > If you know some English, its

Re: Implicit conversion to boolean in if and while statements

2013-02-07 Thread Rick Johnson
On Monday, July 16, 2012 11:18:28 PM UTC-5, Devin Jeanpierre wrote: > On Mon, Jul 16, 2012 at 12:03 AM, Steven D'Aprano wrote: > > On Sun, 15 Jul 2012 22:15:13 -0400, Devin Jeanpierre wrote: > > > >> For example, instead of "if stack:" or "if bool(stack):", we could use > >> "if stack.isempty():".

Re: Implicit conversion to boolean in if and while statements

2013-02-07 Thread Rick Johnson
On Tuesday, July 17, 2012 8:35:09 PM UTC-5, alex23 wrote: > On Jul 17, 6:23 pm, Andrew Berg wrote: > > > On 7/17/2012 2:08 AM, Steven D'Aprano wrote: > > > > The default behaviour is that every object is something, hence true-like, > > > > unless explicitly coded to be treated as false-like. Si

Re: Implicit conversion to boolean in if and while statements

2013-02-07 Thread Rick Johnson
On Tuesday, July 17, 2012 8:35:09 PM UTC-5, alex23 wrote: > On Jul 17, 6:23 pm, Andrew Berg wrote: > > On 7/17/2012 2:08 AM, Steven D'Aprano wrote: > > > The default behaviour is that every object is something, hence true-like, > > > unless explicitly coded to be treated as false-like. Since both

Re: Implicit conversion to boolean in if and while statements

2013-02-07 Thread Rick Johnson
On Friday, February 8, 2013 12:27:09 AM UTC-6, Michael Torrie wrote: > On 02/07/2013 11:16 PM, Rick Johnson wrote: > > He is so accustomed to "guessing" that it has become second nature > > for him. > > I think most of us are guessing as to what you're talking

Re: PyWart: Namespace asinitiy and the folly of the global statement

2013-02-07 Thread Rick Johnson
On Friday, February 8, 2013 12:25:34 AM UTC-6, Chris Angelico wrote: > On Fri, Feb 8, 2013 at 3:30 PM, Rick Johnson wrote: > > It is my strong opinion that all "unqualified" variables must be local to > > the containing block, func/meth, class, or module. To access any

Re: Implicit conversion to boolean in if and while statements

2013-02-08 Thread Rick Johnson
On Friday, February 8, 2013 9:16:42 AM UTC-6, Steven D'Aprano wrote: > Rick Johnson wrote: > > > GvR has always been reluctant to incorporate full OOP machinery for some > > reason. > > Python is a fully object oriented language. It is *more* object oriented

Re: Implicit conversion to boolean in if and while statements

2013-02-08 Thread Rick Johnson
On Friday, February 8, 2013 11:48:43 AM UTC-6, Rick Johnson wrote: > > [...] > > So using a /real/ OOP paridigm we would do the following: > > ## START TRUE OOP PARIDIGM ## > > [...snip naive example...] Actually my example API is littered with artifacts of a

Re: Implicit conversion to boolean in if and while statements

2013-02-08 Thread Rick Johnson
On Friday, February 8, 2013 6:05:54 PM UTC-6, Chris Angelico wrote: > The sum builtin works happily on any sequence of objects > that can be added together. It works as an excellent > flatten() method: > > >>> nested_list = [["q"], ["w","e"], ["r","t","u"], ["i","o","p"]] > >>> sum(nested_list,[])

LangWart: Method congestion from mutate multiplicty

2013-02-08 Thread Rick Johnson
DISCLAIMER: This post covers a universal programming language design flaw using both Python and Ruby code examples to showcase the issue. I really don't like to read docs when learning a language, especially a "so-called" high level language. I prefer to learn the language by interactive sess

Re: LangWart: Method congestion from mutate multiplicty

2013-02-09 Thread Rick Johnson
On Friday, February 8, 2013 9:36:52 PM UTC-6, Steven D'Aprano wrote: > Rick Johnson wrote: > > > The solution is simple. Do not offer the "copy-mutate" methods and force > > all mutation to happen in-place: > > > > py> l = [1,2,3] > > py

Re: Implicit conversion to boolean in if and while statements

2013-02-09 Thread Rick Johnson
On Friday, February 8, 2013 11:01:00 PM UTC-6, Chris Angelico wrote: > [...] > Another advantage of using two characters: There's no conflict between > set and dict literals. How do you notate an empty set in Python? {} > means an empty dict. What makes you believe that a language must provide lit

Re: Implicit conversion to boolean in if and while statements

2013-02-09 Thread Rick Johnson
On Friday, February 8, 2013 7:17:26 PM UTC-6, Chris Angelico wrote: > On Sat, Feb 9, 2013 at 11:49 AM, Rick Johnson > > nested_list = array(array(string)) > > Actually, that's not a declaration, that's an assignment; and in Pike, > a 'type' is a thing, sam

Re: Implicit conversion to boolean in if and while statements

2013-02-09 Thread Rick Johnson
On Friday, February 8, 2013 7:06:34 PM UTC-6, Ian wrote: > On Fri, Feb 8, 2013 at 12:58 PM, Rick Johnson > wrote: > > I'm a bit unnerved by the sum function. Summing a > > sequence only makes sense if the sequence in question > > contains /only/ numeric types. For

Re: LangWart: Method congestion from mutate multiplicty

2013-02-10 Thread Rick Johnson
On Sunday, February 10, 2013 2:39:21 AM UTC-6, Terry Reedy wrote: > While it is true that sorted(iterable) is essentially > > def sorted(iterable): >tem = list(iterable) >tem.sort >return tem > > the body is not an expression and cannot be substituted in an > expression. Yes but th

Re: LangWart: Method congestion from mutate multiplicty

2013-02-10 Thread Rick Johnson
On Sunday, February 10, 2013 3:53:57 AM UTC-6, Neil Hodgson wrote: > Ruby does not use '!' to indicate in-place modification: Really? rb> a = [1,2,3] [1, 2, 3] rb> a.reverse [3, 2, 1] rb> a [1, 2, 3] rb> a.reverse! [3, 2, 1] rb> a [3, 2, 1] And now we will verify that a.reverse! has not assigned

Re: LangWart: Method congestion from mutate multiplicty

2013-02-10 Thread Rick Johnson
On Sunday, February 10, 2013 5:29:54 AM UTC-6, Steven D'Aprano wrote: > Rick wrote: > And you have missed my point, which is that reversed(), and sorted(), were > not added to the language on a whim, but because they were requested, over > and over and over again. Well, well, this explains everyth

Re: LangWart: Method congestion from mutate multiplicty

2013-02-10 Thread Rick Johnson
On Sunday, February 10, 2013 7:30:00 AM UTC-6, Oscar Benjamin wrote: > On 10 February 2013 04:53, Mark Janssen wrote: > > [...] > > I have to agree with Rick, I think requiring the user to explicitly > > create a new object, which is already a good and widely-used practice, > > should be the Only O

Re: LangWart: Method congestion from mutate multiplicty

2013-02-10 Thread Rick Johnson
On Sunday, February 10, 2013 6:12:57 PM UTC-6, Tim Chase wrote: > What should you get if you flatten > > [[[1,2],[3,4]],[[5,6],[7,8]]] > > Should the result be > > [[1,2],[3,4],[5,6],[7,8]] > > or > > [1,2,3,4,5,6,7,8] > > I've needed both cases, depending on the situation. Well provid

Re: Implicit conversion to boolean in if and while statements

2013-02-10 Thread Rick Johnson
On Saturday, February 9, 2013 10:50:25 PM UTC-6, Chris Angelico wrote: > [...] > I don't understand. Wouldn't freezing an array (list) result in a > tuple? And, why should there be no literal syntax for them? > > Having a convenient literal notation for every basic type is extremely > handy. Act

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Sunday, February 10, 2013 5:37:46 AM UTC-6, Steven D'Aprano wrote: > Rick Johnson wrote: > > IMO "Set Types" should only exists as a concequence of "freezing" an > > array, > > Sets are not frozen lists. Indeed. That wording was a bit clumsy on m

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Saturday, February 9, 2013 11:04:42 PM UTC-6, Chris Angelico wrote: > On Sun, Feb 10, 2013 at 3:54 PM, Rick Johnson wrote: > > Well Chris i have wonderful news for you! Python /does/ > > have "homogenous arrays", and they're called, wait for > > it. a

Re: LangWart: Method congestion from mutate multiplicty

2013-02-11 Thread Rick Johnson
On Sunday, February 10, 2013 6:36:20 PM UTC-6, Steven D'Aprano wrote: > Rick Johnson wrote: > > On Sunday, February 10, 2013 5:29:54 AM UTC-6, Steven D'Aprano wrote: > >> Rick wrote: > > [...] > > Steven, the definition of flatten (as relate

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Monday, February 11, 2013 6:40:23 AM UTC-6, Chris Angelico wrote: > [...] > Or doing what you were pointing and laughing at Pike for, and using > two-symbol delimiters. You could even make it majorly logical: > > list_ = [[ 1, 2, 3 ]] > tuple_ = ([ 1, 2, 3 ]) > dict_ = [{ 1, 2, 3 }] > frozendic

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Monday, February 11, 2013 6:50:03 AM UTC-6, Chris Angelico wrote: > On Mon, Feb 11, 2013 at 11:28 PM, Rick Johnson > > Well i would expect anyone who considers himself a > > python programmer (not to mention "pythonista"!) to at > > minimum be familiar with the s

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Monday, February 11, 2013 7:35:23 AM UTC-6, Chris Angelico wrote: > On Tue, Feb 12, 2013 at 12:13 AM, Rick Johnson wrote: > > I am vehemently against using more than one "opening seq char" and one > > "closing seq char". ... we could use start and end

Re: Implicit conversion to boolean in if and while statements

2013-02-11 Thread Rick Johnson
On Monday, February 11, 2013 7:52:24 AM UTC-6, Chris Angelico wrote: > [...] > But my statement wasn't based on my own knowledge of the stdlib, but > rather on this: > > On Sat, Feb 9, 2013 at 6:58 AM, Rick Johnson wrote: > > I'm a bit unnerved by the sum functi

Re: LangWart: Method congestion from mutate multiplicty

2013-02-11 Thread Rick Johnson
On Monday, February 11, 2013 7:27:30 AM UTC-6, Chris Angelico wrote: > So... > flatten([None, 23, [1, 2, 3], (2, 3), ["spam", "ham"]]) > > would return > > [None, 23, 1, 2, 3, (2, 3), "spam", "ham"] > > I think that's even more unexpected. Why? Are you over-analyzing? Show me a result that /do

Re: Implicit conversion to boolean in if and while statements

2013-02-12 Thread Rick Johnson
On Monday, February 11, 2013 11:55:19 PM UTC-6, Chris Angelico wrote: > On Tue, Feb 12, 2013 at 12:06 PM, 8 Dihedral wrote: > > A permanently mutated list is a tuple of constant objects. > > I nominate this line as "bemusing head-scratcher of the week". Actually the statement is fact IF you ca

Re: LangWart: Method congestion from mutate multiplicty

2013-02-12 Thread Rick Johnson
On Monday, February 11, 2013 11:28:57 PM UTC-6, zipher wrote: > [...] > Yeah, this is where one has to consider the idea of a unified data > model (a sort of OOPv2). Right now, it's all confused because people > are using their own internal, subconscious ideas of data. Indeed! The current parad

Re: Awsome Python - chained exceptions

2013-02-12 Thread Rick Johnson
On Tuesday, February 12, 2013 12:15:29 AM UTC-6, Steven D'Aprano wrote: > [snip inflammatory remarks] > I thought I'd present a few of Python's more > awesome features, starting with exception contexts. Well that's great idea, however, in order to find this very "valuable" information the searche

Re: Awsome Python - chained exceptions

2013-02-12 Thread Rick Johnson
On Tuesday, February 12, 2013 12:01:45 PM UTC-6, Zero Piraeus wrote: > You could call them PyW00ts. +1 on the name -INFINITY on the execution Actually i am happy that DeAprano used the unintuitive tag now. Bad enough to use an unintuitive tag. Worse to misspell it. But it would been a crime to

Re: string.replace doesn't removes ":"

2013-02-12 Thread Rick Johnson
On Saturday, February 9, 2013 5:04:18 AM UTC-6, Joshua Robinson wrote: > Hi Monte-Pythons, > > x = "this is a simple : text: that has colon" > s = x.replace(string.punctuation, ""); OR > s = x.replace(string.punctuation, ""); > print x # 'this is a simple : text: that has colon' > > # The col

Re: string.replace doesn't removes ":"

2013-02-12 Thread Rick Johnson
On Tuesday, February 12, 2013 10:44:09 PM UTC-6, Rick Johnson wrote: > > REFERENCES: > > [1]: Should string.replace handle list, tuple and dict > arguments

Re: Awsome Python - chained exceptions

2013-02-13 Thread Rick Johnson
On Wednesday, February 13, 2013 12:58:46 AM UTC-6, Chris Angelico wrote: > On Wed, Feb 13, 2013 at 1:47 PM, Rick Johnson wrote: > >On Tuesday, February 12, 2013 12:15:29 AM UTC-6, Steven D'Aprano wrote: > >> If you've ever written an exception handler, you'

Re: Awsome Python - chained exceptions

2013-02-13 Thread Rick Johnson
On Wednesday, February 13, 2013 10:14:34 AM UTC-6, Rick Johnson wrote: > The proper method of using a forward compatible print > function is by /importing/ the feature. > >from future import print_function Urm... of course the proper /PROPER/ way would be to NOT throw an

Re: string.replace doesn't removes ":"

2013-02-13 Thread Rick Johnson
On Wednesday, February 13, 2013 1:10:14 AM UTC-6, jmfauth wrote: > > >>> d = {ord('a'): 'A', ord('b'): '2', ord('c'): 'C'} > >>> 'abcdefgabc'.translate(d) > 'A2CdefgA2C' > >>> > >>> > >>> def jmTranslate(s, table): > ... table = {ord(k):table[k] for k in table} > ... return s.translate(tabl

Re: Suggested feature: slice syntax within tuples (or even more generally)?

2013-02-14 Thread Rick Johnson
On Thursday, February 14, 2013 4:01:39 PM UTC-6, steph...@gmail.com wrote: > On Thursday, February 14, 2013 1:58:06 PM UTC-5, Ian wrote: > > [snip: quote noise!] > Dude! Please trim this quote noise from your posts. I know Google's quoting mechanism is buggy, but dammit man YOU'RE A PROGRAMER!

Re: Awsome Python - chained exceptions

2013-02-14 Thread Rick Johnson
On Thursday, February 14, 2013 6:01:51 AM UTC-6, Ulrich Eckhardt wrote: > [...] > > try: > rrick.go_and_[edit]_yourself() > finally: > rrick.get_lost() Oops, you forgot to catch "FloatingPointError" and so your code choked in the try block -- typical newbie mistake. -- http://mail.pyt

Re: First attempt at a Python prog (Chess)

2013-02-14 Thread Rick Johnson
On Thursday, February 14, 2013 11:48:10 AM UTC-6, Chris Hinsley wrote: > Is a Python list as fast as a bytearray? Why would you care about that now? Are you running this code on the Xerox Alto? Excuse me for the sarcasm but your post title has perplexed me: "First attempt at a Python prog (Che

Re: Awsome Python - chained exceptions

2013-02-14 Thread Rick Johnson
On Friday, February 15, 2013 12:18:17 AM UTC-6, Chris Angelico wrote: > And yet it is still a perfect example of how a line of > code inside a 'try' block can indeed be offensive. Oh nice try, but we are not fooled by your straw-man. My exact statement that provoked this whole thing was: """ Q1:

Re: Can someone tell me what kinds of questions should be asked in this list and what kinds in the tutor section?

2013-02-17 Thread Rick Johnson
On Sunday, February 17, 2013 3:44:29 AM UTC-6, Tim Golden wrote: > On 17/02/2013 00:19, Claira wrote: > > Can someone tell me what kinds of questions should be asked in this > > list and what kinds in the tutor section? > > There's no clear-cut distinction. The rule of thumb I usually > apply is t

Re: Comparing types

2013-02-17 Thread Rick Johnson
On Sunday, February 17, 2013 12:34:57 AM UTC-6, Jason Friedman wrote: > [...] > py> my_pattern = re.compile(s) > py> type(my_pattern) > > py> isinstance(my_pattern, _sre.SRE_Pattern) > Traceback (most recent call last): > File "", line 1, in > NameError: name '_sre' is not defined Both Steven

Re: Can someone tell me what kinds of questions should be asked in this list and what kinds in the tutor section?

2013-02-17 Thread Rick Johnson
On Sunday, February 17, 2013 5:10:18 PM UTC-6, Oscar Benjamin wrote: > More > often questions are asked on python-list that would be more > appropriate on python-tutor. I've never seen anyone suggest that a > question be asked on python-tutor when this happens, which is a shame > since the same qu

Re: Awsome Python - chained exceptions

2013-02-17 Thread Rick Johnson
On Sunday, February 17, 2013 7:35:24 PM UTC-6, alex23 wrote: > Any chance you can stop sending to both comp.lang.python _and_ the > python-list, given the former is a mirror of the later? I apologize for this doubling of my messages and i can assure you i don't do this intentionally. Proper net

Re: news.gmane.org (was Re: Awsome Python - chained exceptions

2013-02-17 Thread Rick Johnson
Terry Reedy udel.edu> writes: > For at least the 10th time, there is little to no excuse for reading and > writing python-list thru google-groups. The news.gmane.org mirror has > multiple interfaces: [Sent from gmane.comp.python.general] Yes you have mentioned this before and for some reason i

Python Warts: The where, when, how, and why of a PyWart.

2013-02-18 Thread Rick Johnson
NOTE: This thread is actually an extension (of sorts) to a thread started by "Anatoly tecktonik" back in December 2012; posted on the python-ideas mailing list; titl

Re: news.gmane.org (was Re: Awsome Python - chained exceptions

2013-02-18 Thread Rick Johnson
yahoo.com> writes: > On 02/17/2013 11:10 PM, Terry Reedy wrote: > > For at least the 10th time [...] > > And for at least the 11th time, you are wrong. There are reasons > (not applicable to everyone but applicable to many) for using > Google Groups, among others it is more accessible and easie

Re: request for help

2013-02-18 Thread Rick Johnson
leonardo selmi icloud.com> writes: > [...] > i saved the above program from python shell into a file as > "circle.py" . when i type "import circle" i get error.. Urm... would you be so kind as to copy and paste the error message verbatim? You have obvious syntax errors in this code due to improp

Re: request for help

2013-02-18 Thread Rick Johnson
leonardo libero.it> writes: > here is the error message: > [...] Okay, now we are on the road to solving this problem. But first we need to take a slight detour and learn about python packaging, because no matter what the current error is, naming a module "circle" and then throwing it naked out

Re: Python Warts: The where, when, how, and why of a PyWart.

2013-02-18 Thread Rick Johnson
On Monday, February 18, 2013 4:31:01 PM UTC-6, Terry Reedy wrote: > This was a threat to abuse StackOverflow with off-topic posts if 'we' > did not pay him more attention. If that is in-fact true then i am going to be as upset with Anatoly as you seem to be. Pointing out problems on appropriate

Re: tkinter / gui

2013-02-24 Thread Rick Johnson
On Saturday, February 23, 2013 4:50:43 PM UTC-6, Rex Macey wrote: > Here is one general and one specific question about > creating GUIs using tkinter from a newbie. I have created > a class in which to hold some data. I want to create a > GUI to get the data from the user and store it in the > ob

Re: Basic Listview Example

2013-02-24 Thread Rick Johnson
On Friday, February 22, 2013 12:03:30 PM UTC-6, Xx7 wrote: > Hi, could somebody possibly provide a basic listview example? thanks! Depends on your definition of a "listview". We NOW know you want examples of GUI widgets; but /which/ GUI library do you plan on using? If you are not sure which l

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Rick Johnson
On Tuesday, February 26, 2013 4:17:22 PM UTC-6, Jason Swails wrote: > Just to throw in my 2c -- in the same way that 'a picture > is worth a thousand words', an interactive interpreter is > worth volumes of documentation (especially one with such a > nice help()/__doc__ functionality). Yes! I don'

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Rick Johnson
On Tuesday, February 26, 2013 7:48:51 PM UTC-6, Terry Reedy wrote: > On 2/26/2013 1:52 PM, Devin Jeanpierre wrote: > > > > [...snip legit complaint...] > > > Have you opened an issue, or checked for existing issue? I would be open > to the idea that entries like that for int should not be overly

Re: mp3

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 3:58:03 PM UTC-6, fabriceS wrote: > Is anybody know how to get the lenght (in seconds) of a mp3 file ? Well Mp3's have a huge header with tons of info stuffed inside. And i remember seeing a nice recipe on the Python cookbook (or maybe SO) for parsing the data. I

Re: Do you feel bad because of the Python docs?

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 7:22:44 AM UTC-6, Antoine Pitrou wrote: > Which means that in the end you would really want a diversity of HOWTOs > targeted at different usages of the stdlib. But it is a lot of work to > write *and* maintain. So instead we maintain a "simple", albeit broken, doc t

Re: Project Based python tutorials

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 2:31:11 AM UTC-6, Alvin Ghouas wrote: > First of all: Im new to this group and i dont know if > there are any "rules" or jargon around her. If so; pleas > fill me in. The only rules are there are no rules. All we can hope is that everyone will "try" to play nicely

Re: Do you feel bad because of the Python docs?

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 5:25:25 PM UTC-6, alex23 wrote: > Ranting on public forums is nothing but posturing at best, and at > worst an attempt to blackmail-by-shame people into doing something for > you. Same goes for calls for "the community" to "fix" things. What you call ranting is most

Re: Do you feel bad because of the Python docs?

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 8:44:08 PM UTC-6, Chris Angelico wrote: > On Thu, Feb 28, 2013 at 1:05 PM, Rick Johnson wrote: > > This is why i will AGAIN mention my PyWarts list > > (Hypothetical at this point). We need an official place > > for the many problems of Python

Re: Do you feel bad because of the Python docs?

2013-02-27 Thread Rick Johnson
On Wednesday, February 27, 2013 10:18:46 PM UTC-6, alex23 wrote: > You claim that no one has time to write a bug report. I point out that > if they can spend the time ranting about the bug, then they have the > time. And i would like to point out that all your nay-saying and condemnations are ta

Re: Do you feel bad because of the Python docs?

2013-02-28 Thread Rick Johnson
On Wednesday, February 27, 2013 11:57:05 PM UTC-6, alex23 wrote: > On Feb 28, 2:53 pm, Rick Johnson wrote: > > On Wednesday, February 27, 2013 10:18:46 PM UTC-6, alex23 wrote: > [...] > * Do you care about the evolution of Python or just give > it lip service? > > I don

Re: Issue with continous incrementing of unbroken sequence for a entire working day

2013-02-28 Thread Rick Johnson
On Thursday, February 28, 2013 10:31:58 AM UTC-6, Morten Engvoldsen wrote: > [...] > So if the batch has 10 records and last serial number of > first batch is 10, then when the batch runs second time in > the same day, how the 'serial_number' will get the value > of 10 and then continue the serial

Re: suggestions for improving code fragment please

2013-02-28 Thread Rick Johnson
On Thursday, February 28, 2013 1:47:12 PM UTC-6, The Night Tripper wrote: > I'm being very dumb ... how can I simplify this fragment? > > if arglist: > arglist.pop(0) > if arglist: > self.myparm1 = arglist.pop(0) > if arglist: >

Re: Issue with continous incrementing of unbroken sequence for a entire working day

2013-02-28 Thread Rick Johnson
On Thursday, February 28, 2013 2:41:30 PM UTC-6, Morten Engvoldsen wrote: > > [...] > > def salesrecord(): >     serial_number = 0 >     sales_recrod = {'record1':'product1', > 'record2':'product2', > 'record3':'product3', > } > >     for

Re: raw format string in string format method?

2013-02-28 Thread Rick Johnson
On Thursday, February 28, 2013 8:11:17 AM UTC-6, Helmut Jarausch wrote: > Hi, > > > > I'd like to print a string with the string format method which uses > {0}, ... /What/ uses "{0}" exactly? The substring you wish to inject or the format method? If the latter, we are aware of that! > Unfortu

Re: raw format string in string format method?

2013-02-28 Thread Rick Johnson
On Thursday, February 28, 2013 8:42:31 AM UTC-6, Helmut Jarausch wrote: > Originally I had used percent-formatting > But isn't it deprecated in Python 3.X ? I don't know the current state of "percent formats" future, however, i can tell you that it should be deprecated ASAP! Simpleminded Sam b

Re: need for help

2013-03-01 Thread Rick Johnson
On Friday, March 1, 2013 12:35:14 PM UTC-6, leonardo selmi wrote: > class ball: > > [...] > Now that you've gotten the exceptions sorted, it may be time to join the *other* 99% of programmers by editing that class identifier. All class symbols should start with (at minimum) a capitol letter.

Re: Is it correct this way to inherit from a list?

2013-03-02 Thread Rick Johnson
On Saturday, March 2, 2013 11:02:14 AM UTC-6, gialloporpora wrote: > I would like to inherit from the list native class. really > I expected that was possible to use native list method > without redefining them, for example the __repr__ method. > > [...] > > class vector(list): > def __init

Re: Dealing with exceptions

2013-03-02 Thread Rick Johnson
On Saturday, March 2, 2013 11:40:11 AM UTC-6, bvdp wrote: > Every time I write a program with exception handling (and > I suppose that includes just about every program I write!) > I need to scratch my brain when I create try blocks. > > For example, I'm writing a little program do copy specific >

Re: Question on for loop

2013-03-04 Thread Rick Johnson
On Monday, March 4, 2013 6:18:20 AM UTC-6, newtopython wrote: [Note: Post has be logically re-arranged for your comprehensive pleasures] > for character in secretWord: > if character not in lettersGuessed: > return True > return False > > What this code is doing is only checking

Re: listbox binding..what is the current selection?

2013-03-05 Thread Rick Johnson
On Tuesday, March 5, 2013 6:54:45 PM UTC-6, Rex Macey wrote: > I have a listbox with two strings "Fixed" and "Random". > [...] Here's the beginning of the set_lengthtype code: > > def set_lengthtype(event=None): >s=lbLengthtype.get(tk.ACTIVE) >print(s) >. > > The print(s) state

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 5:50:35 PM UTC-6, Terry Reedy wrote: > If you find a bug in this documentation or would like to propose an > improvement, please send an e-mail to d...@python.org describing the bug > and where you found it. If you have a suggestion how to fix it, include > that as w

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 7:06:56 PM UTC-6, alex23 wrote: > Why do you have such a low opinion of others that you think they're > unable to look up "Reporting Bugs" in the _documentation_? I don't have a low opinion of anybody here. However the fact that this community needs an entry level path

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 7:52:59 PM UTC-6, Terry Reedy wrote: > > How much longer are we going to "treat the symptoms" > > We would VERY MUCH like a system to make it easier for readers to report > doc bugs and developers to fix them. No one yet has come up with both a > reasonable idea and

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 8:28:42 PM UTC-6, alex23 wrote: > On Mar 7, 11:31 am, Rick Johnson wrote: > > I don't have a low opinion of anybody here. However the fact that > > this community needs an entry level path for bug/grievance reports > > is *glaringly* obviou

Re: Do you feel bad because of the Python docs?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 9:12:37 PM UTC-6, alex23 wrote: > Your obsession with Guido is tiring. And your false accusations that i am somehow "obsessed" with GvR have BEEN tiring for quite some time! I am neither passionate for or prejudice against the man. I simple ask that he live up to hi

Re: listbox binding..what is the current selection?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 10:38:22 PM UTC-6, Rex Macey wrote: > I have spent time with the docs, at least with the Python > v3.3 and tkinter v8.5 (pdf). Could you post links to the documents you are reading please? Actually when i said "read the docs" i did not mean the offical Python docs on

Re: Why is Ruby on Rails more popular than Django?

2013-03-06 Thread Rick Johnson
On Wednesday, March 6, 2013 8:58:12 PM UTC-6, rusi wrote: > "Where there is choice there is no freedom" > [snip link] > > Python-for-web offered so much choice -- zope, django, turbogears, > cherrypy, web.py etc etc -- that the newbie was completely drowned. > With Ruby there is only one choice to

Re: Why is Ruby on Rails more popular than Django?

2013-03-07 Thread Rick Johnson
On Thursday, March 7, 2013 3:28:41 AM UTC-6, Rui Maciel wrote: > rusi wrote: > > > Anyone who's used emacs will know this as the bane of FLOSS software > > -- 100 ways of doing something and none perfect -- IOW too much > > spurious choice. > > This is a fallacy. Just because someone claims that

Re: listbox binding..what is the current selection?

2013-03-07 Thread Rick Johnson
On Thursday, March 7, 2013 9:13:16 AM UTC-6, William Ray Wing wrote: > With apologies for jumping into the middle of this > discussion, but I've found the most helpful tkinter v8.5 > docs to be the set at New Mexico tech: Well these are free and open forums the last time i checked. Don't worry

<    4   5   6   7   8   9   10   11   >