Re: Why assert is not a function?

2021-03-02 Thread Hexamorph
Am 03.03.2021 um 00:24 schrieb Chris Angelico: > On Wed, Mar 3, 2021 at 10:22 AM Mirko via Python-list > wrote: >> >> Am 02.03.2021 um 23:09 schrieb Stestagg: >>> Ignoring the question about this feature being particularly useful, it >> >> It is useful because "assert" is primarily (if not purely

Re: What user-defined request error levels are recommended?

2020-04-30 Thread Hexamorph
Am 30.04.2020 um 22:56 schrieb Dan Campbell: > On Thursday, April 30, 2020 at 4:42:41 PM UTC-4, Ed Leafe wrote: >> On Apr 30, 2020, at 15:14, dc wrote: >>> >>> Hi, what range of error codes are recommended, if we wanted to return a >>> user-defined code? >>> >>> Obviously, we don't want to use a c

Re: Problem

2020-10-01 Thread Hexamorph
Am 01.10.2020 um 22:17 schrieb Chris Angelico: > Maybe those usability improvements have already been done. Haven't doubted that. Maybe they are just not enough yet. > Renaming Idle to "Python IDE" would be a very bad idea, since there > are many other Python IDEs. You missed the "(or similar)"

Re: Problem

2020-10-02 Thread Hexamorph
Am 02.10.2020 um 11:58 schrieb Terry Reedy: > On 10/1/2020 4:09 PM, Mirko via Python-list wrote: > >> Renaming "IDLE" to "Python IDE" (or similar) might also. > "IDLE" intentionally echoes 'Idle', as in Eric Idle of Monty > Python. It stands for "Integrated Development and Learning > Environment".

Re: Iteration over strings

2007-07-31 Thread Hexamorph
Jay Loden schrieb: > Robert Dailey wrote: >> str = "C:/somepath/folder/file.txt" >> >> for char in str: >> if char == "\\": >> char = "/" > strings in Python are immutable - in other words, they cannot be updated in > place as you're doing above. However, that doesn't mean you can't a

Re: Iteration over strings

2007-07-31 Thread Hexamorph
Jay Loden schrieb: > > I have to agree with you WRT to the Python documentation, it does tend to be > lacking and difficult to find things at times. In this case the two ways I > can think of to look for something like this would have been: Hmm, I find the Python documentation just excellent.

Re: Iteration over strings

2007-07-31 Thread Hexamorph
Hexamorph schrieb: > Jay Loden schrieb: >> >> I have to agree with you WRT to the Python documentation, it does tend >> to be lacking and difficult to find things at times. Hmm, I find the Python documentation just excellent. You are searching for a *string* related problem

Re: Iteration over strings

2007-07-31 Thread Hexamorph
Jay Loden schrieb: > Well, I don't want to start a flamewar or anything like that Nothing like that intended here either :) OTOH, on most forums, lists, boards, etc, I am active, the constant fear about "flamewars" annoys me somewhat. As long as it doesn't get insulting, derogative or bull-hea

Re: piping into a python script

2008-01-24 Thread Hexamorph
Donn Ingle wrote: > Paddy wrote: >> fileinput is set to process each file a line at a time unfortunately. > Wow. So there seems to be no solution to my OP. I'm amazed, I would have > thought a simple list of strings, one from stdin and one from the args, > would be easy to get. > > I *really* don'

Re: Operator overloading

2008-01-25 Thread Hexamorph
[EMAIL PROTECTED] wrote: > > Diez B. Roggisch wrote: >> No, there is no way. You would change general interpreter behavior if >> you could set arbitrary operators for predefined types. >> >> Start grumping... > > Thank you, Diez. > > If I ever design a language, please remind me that complete, e

Re: Operator overloading

2008-01-25 Thread Hexamorph
[EMAIL PROTECTED] wrote: > > Hexamorph wrote: >> You mean you want the ability to change for example the + operator >> for ints to something like calculating the cosine instead of doing >> addition? > > Sure. Cosines are a monadic operation and the monadic 

Re: Index of maximum element in list

2008-01-25 Thread Hexamorph
Henry Baxter wrote: > Oops, gmail has keyboard shortcuts apparently, to continue: > > def maxi(l): > m = max(l) > for i, v in enumerate(l): > if m == v: > return i > What's about l.index(max(l)) ? -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a light weighted library/tool to write simple GUI above the text based application

2008-01-25 Thread Hexamorph
Lorenzo E. Danielsson wrote: > [EMAIL PROTECTED] wrote: >> I think I was not specific/clear enough in my first posting. I know >> the curses library ( http://pyncurses.sourceforge.net ). It AFIK >> provides TUI (short for: Text User Interface or Textual User >> Interface). My needs are GUI, I mean

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Hexamorph
wheres pythonmonks wrote: A new python convert is now looking for a replacement for another perl idiom. In particular, since Perl is weakly typed, I used to be able to use unpack to unpack sequences from a string, that I could then use immediately as integers. In python, I find that when I use

Re: Python "why" questions

2010-08-07 Thread Hexamorph
rantingrick wrote: Well not if you are referring to how people "say" things. But what people "say" and the facts of reality are some times two different things. Heck we even have a few folks in this group who overuse the expression "used to" quite frequently in place of the more correct term "pr

Re: Python "why" questions

2010-08-12 Thread Hexamorph
Terry Reedy wrote: On 8/9/2010 11:16 AM, Grant Edwards wrote: Just for the record: I sincerely apologize for my rant. I usually don't loose control so heavily, but this "Rick" person makes me mad (killfile'd now) IOW, the "Ugly American". No! That's not what I said. I'm myself one of tho

Re: get python bit version as in (32 or 64)

2010-10-19 Thread Hexamorph
On 19.10.2010 23:18, Vincent Davis wrote: How do I get the bit version of the installed python. In my case, osx python2.7 binary installed. I know it runs 64 bt as I can see it in activity monitor. but how do I ask python? sys.version '2.7 (r27:82508, Jul 3 2010, 21:12:11) \n[GCC 4.0.1 (Apple In