Re: Python Worst Practices

2015-03-06 Thread Thomas Rachel
Am 26.02.2015 01:37 schrieb Chris Angelico: My bad. I was talking in a context of Python programming, specifically with APIs where you would use some kind of true/false flag as either a function parameter or a return value. Oh. Then take subprocess.Popen.wait()... :-P Thomas -- https://mail.

Re: Newbie question about text encoding

2015-03-06 Thread Terry Reedy
On 3/6/2015 11:20 AM, Rustom Mody wrote: = pp = "💩" print (pp) = Try open it in idle3 and you get (at least I get): $ idle3 ff.py Traceback (most recent call last): File "/usr/bin/idle3", line 5, in main() File "/usr/lib/python3.4/idlelib/PyShell.py", line 1562, in m

Re: Append a file

2015-03-06 Thread Jason Friedman
On Fri, Mar 6, 2015 at 2:55 PM, Jason Venneri wrote: > Hello, I'm using the urllib.urlretrieve command to retrieve a couple of lines > of data. I want to combine the two results into one file not two. > > Any suggestions? > > Sample > urllib.urlretrieve('http://www.airplanes.com/data/boeing1.htm

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-06 Thread Rustom Mody
On Saturday, March 7, 2015 at 10:36:54 AM UTC+5:30, Gregory Ewing wrote: > alister wrote: > > a popular UK soap made an extreme > > effort not to show a cross or Christmas tree during a church wedding in > > case it "offended not-Christians". > > In today's climate, when offending certain variet

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-06 Thread Gregory Ewing
alister wrote: a popular UK soap made an extreme effort not to show a cross or Christmas tree during a church wedding in case it "offended not-Christians". In today's climate, when offending certain varieties of non-Christian can get you blown up or shot, it might not be quite as silly as it s

Re: Odo: Shapeshifting for your data

2015-03-06 Thread Mark Lawrence
On 07/03/2015 04:42, Steve Hayes wrote: On Fri, 06 Mar 2015 20:03:07 +, Mark Lawrence wrote: https://odo.readthedocs.org/en/latest/ I don't know if there is a need for shunting data around in this way but some of you may find this interesting. That looks very interesting indeed. What w

Re: Odo: Shapeshifting for your data

2015-03-06 Thread Steve Hayes
On Fri, 06 Mar 2015 20:03:07 +, Mark Lawrence wrote: >https://odo.readthedocs.org/en/latest/ > >I don't know if there is a need for shunting data around in this way but >some of you may find this interesting. That looks very interesting indeed. What wasn't clear is whether odo is somethin

Re: Is nan in (nan,) correct?

2015-03-06 Thread Rustom Mody
On Saturday, March 7, 2015 at 5:04:02 AM UTC+5:30, Steven D'Aprano wrote: > Rustom Mody wrote: > > > On Friday, March 6, 2015 at 10:13:55 PM UTC+5:30, Steven D'Aprano wrote: > >> Rustom Mody wrote: > >> > >> > On Friday, March 6, 2015 at 3:57:12 AM UTC+5:30, rand...@fastmail.us > >> > wrote: > >>

Re: A strange statement in the bisect documentation?

2015-03-06 Thread Steven D'Aprano
Dmitry Chichkov wrote: > I was looking over documentation of the bisect module and encountered the > following very strange statement there: > > From https://docs.python.org/2/library/bisect.html > > ...it does not make sense for the bisect() functions to have key or > reversed arguments because

A strange statement in the bisect documentation?

2015-03-06 Thread Dmitry Chichkov
I was looking over documentation of the bisect module and encountered the following very strange statement there: >From https://docs.python.org/2/library/bisect.html ...it does not make sense for the bisect() functions to have key or reversed arguments because that would lead to an inefficient

Re: Is nan in (nan,) correct?

2015-03-06 Thread Steven D'Aprano
Rustom Mody wrote: > On Friday, March 6, 2015 at 10:13:55 PM UTC+5:30, Steven D'Aprano wrote: >> Rustom Mody wrote: >> >> > On Friday, March 6, 2015 at 3:57:12 AM UTC+5:30, rand...@fastmail.us >> > wrote: >> >> It's been brought up on Stack Overflow that the "in" operator (on >> >> tuples, and by

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-06 Thread Ben Finney
Steven D'Aprano writes: > (Well, I call it a "mild put-down". Ben may or may not agree that it is > mild.) I agree that the put-down is mild, in that the person uttering it probably doesn't expect it to be more than a mild insult to the person they were addressing. That's quite orthogonal to th

Re: http: connection reset by peer

2015-03-06 Thread Chris Angelico
On Sat, Mar 7, 2015 at 9:12 AM, Grant Edwards wrote: > On 2015-03-06, Emile van Sebille wrote: >> On 3/5/2015 12:18 PM, Chris Angelico wrote: >>> On Fri, Mar 6, 2015 at 5:37 AM, Ethan Furman wrote: >> After mucking about with it with no results, I went on to another job -- when I came

Re: http: connection reset by peer

2015-03-06 Thread Grant Edwards
On 2015-03-06, Emile van Sebille wrote: > On 3/5/2015 12:18 PM, Chris Angelico wrote: >> On Fri, Mar 6, 2015 at 5:37 AM, Ethan Furman wrote: > >>> After mucking about with it with no results, I went on to another job >>> -- when I came back to this one it was working. >> >> Huh. Well, if it recur

Re: Append a file

2015-03-06 Thread sohcahtoa82
On Friday, March 6, 2015 at 1:55:31 PM UTC-8, Jason Venneri wrote: > Hello, I'm using the urllib.urlretrieve command to retrieve a couple of lines > of data. I want to combine the two results into one file not two. > > Any suggestions? > > Sample > urllib.urlretrieve('http://www.airplanes.com

Append a file

2015-03-06 Thread Jason Venneri
Hello, I'm using the urllib.urlretrieve command to retrieve a couple of lines of data. I want to combine the two results into one file not two. Any suggestions? Sample urllib.urlretrieve('http://www.airplanes.com/data/boeing1.html','B747A.txt') urllib.urlretrieve('http://www.airplanes.com/dat

Re: http: connection reset by peer

2015-03-06 Thread Emile van Sebille
On 3/5/2015 12:18 PM, Chris Angelico wrote: On Fri, Mar 6, 2015 at 5:37 AM, Ethan Furman wrote: After mucking about with it with no results, I went on to another job -- when I came back to this one it was working. Huh. Well, if it recurs, see what you can find out about it... otherwise, pr

Re: Speeding up permutations generation

2015-03-06 Thread Stefan Behnel
Ian Kelly schrieb am 06.03.2015 um 18:13: > On Fri, Mar 6, 2015 at 1:24 AM, Abhiram R wrote: >>> A list of 100 elements has approximately 9.33 x 10**157 permutations. >>> If you could somehow generate one permutation every yoctosecond, >>> exhausting them would still take more than a hundred orders

Re: Odo: Shapeshifting for your data

2015-03-06 Thread sohcahtoa82
On Friday, March 6, 2015 at 12:03:59 PM UTC-8, Mark Lawrence wrote: > https://odo.readthedocs.org/en/latest/ > > I don't know if there is a need for shunting data around in this way but > some of you may find this interesting. > > Now let's see how long it takes to go wonderfully off topic. I'l

Odo: Shapeshifting for your data

2015-03-06 Thread Mark Lawrence
https://odo.readthedocs.org/en/latest/ I don't know if there is a need for shunting data around in this way but some of you may find this interesting. Now let's see how long it takes to go wonderfully off topic. I'll give it five minutes. -- My fellow Pythonistas, ask not what our language

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-06 Thread Christian Gollwitzer
Am 06.03.15 um 19:15 schrieb Marko Rauhamaa: > llanitedave : > >> It's obvious that's what's needed here is a PEP requiring that the >> International Phonetic Alphabet be used for all Python identifiers and >> keywords. > > You're onto something: ROFL!!! Though I'd prefer a few identifiers in a d

Re: Make standalone gui-enabled app for LINUX

2015-03-06 Thread Christian Gollwitzer
Am 06.03.15 um 09:14 schrieb Mehdi: > On Friday, March 6, 2015 at 12:58:11 AM UTC+3:30, Christian Gollwitzer wrote: >> Use pyinstaller. It creates a "portable app", i.e. either single file or >> directory which can be run on (nearly) any system. However the resulting >> files can be awfully big. I

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-06 Thread Marko Rauhamaa
llanitedave : > It's obvious that's what's needed here is a PEP requiring that the > International Phonetic Alphabet be used for all Python identifiers and > keywords. You're onto something: #!/ˈjuːzəɹ/bɪn/ɛnv ˈpaɪˌθɑːn3 #

Re: Is nan in (nan,) correct?

2015-03-06 Thread Ethan Furman
On 03/06/2015 10:04 AM, Rustom Mody wrote: > On Friday, March 6, 2015 at 10:29:19 PM UTC+5:30, Steven D'Aprano wrote: >> def inverse(x): >> return 1.0/x >> >> There's an exception there, waiting to bite. If I include inverse() in some >> complex calculation: >> >> def function(x, y): >> re

Re: Is nan in (nan,) correct?

2015-03-06 Thread Rustom Mody
On Friday, March 6, 2015 at 10:29:19 PM UTC+5:30, Steven D'Aprano wrote: > Rustom Mody wrote: > > > On Friday, March 6, 2015 at 3:31:58 PM UTC+5:30, Chris Angelico wrote: > >> On Fri, Mar 6, 2015 at 8:50 PM, Rustom Mody wrote: > >> > In a language like python with decent exceptions we do not need

Re: Is nan in (nan,) correct?

2015-03-06 Thread Rustom Mody
On Friday, March 6, 2015 at 10:48:07 PM UTC+5:30, Chris Angelico wrote: > On Sat, Mar 7, 2015 at 4:04 AM, Rustom Mody wrote: > > You dont grok your theory of computation very well do you? > > > > def foo(x): return x + x > > def bar(x): return x + x > > def baz(x): return 2*x > > > > One can imagi

Re: Is nan in (nan,) correct?

2015-03-06 Thread Chris Angelico
On Sat, Mar 7, 2015 at 4:04 AM, Rustom Mody wrote: > You dont grok your theory of computation very well do you? > > def foo(x): return x + x > def bar(x): return x + x > def baz(x): return 2*x > > One can imagine an implementation where > id(foo) == id(bar) > [I am assuming that id is a good enoug

Re: Speeding up permutations generation

2015-03-06 Thread Ian Kelly
On Fri, Mar 6, 2015 at 1:24 AM, Abhiram R wrote: > >> >> A list of 100 elements has approximately 9.33 x 10**157 permutations. >> If you could somehow generate one permutation every yoctosecond, >> exhausting them would still take more than a hundred orders of >> magnitude longer than the age of t

Re: Is nan in (nan,) correct?

2015-03-06 Thread Steven D'Aprano
random...@fastmail.us wrote: > On Thu, Mar 5, 2015, at 22:49, Chris Angelico wrote: >> I'm not sure it's just an optimization. Compare this post from >> python-dev, where Nick Coghlan discusses the same topic: >> >> https://mail.python.org/pipermail/python-dev/2014-July/135476.html > > If it is

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-06 Thread Steven D'Aprano
alister wrote: > I have not seen one female poster on this site claim to be offended by > the comment or even consider it to be a slur. In fairness to Ben, it must be recognised that there are very few women here, and that is a problem Ben (and I) would like to rectify. We just disagree on the r

Re: Is nan in (nan,) correct?

2015-03-06 Thread Rustom Mody
On Friday, March 6, 2015 at 10:13:55 PM UTC+5:30, Steven D'Aprano wrote: > Rustom Mody wrote: > > > On Friday, March 6, 2015 at 3:57:12 AM UTC+5:30, rand...@fastmail.us > > wrote: > >> It's been brought up on Stack Overflow that the "in" operator (on > >> tuples, and by my testing on dict and list

Re: Is nan in (nan,) correct?

2015-03-06 Thread Steven D'Aprano
Rustom Mody wrote: > On Friday, March 6, 2015 at 3:31:58 PM UTC+5:30, Chris Angelico wrote: >> On Fri, Mar 6, 2015 at 8:50 PM, Rustom Mody wrote: >> > In a language like python with decent exceptions we do not need nans. >> >> Not so. I could perhaps accept that we don't need signalling NaNs, as

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-06 Thread Rustom Mody
On Friday, March 6, 2015 at 9:08:07 AM UTC+5:30, Chris Angelico wrote: > Allow me to summarize this subthread: > > * sohcahtoa makes a comment implying that this list is full of nerds > who know nothing about dating. Gender-nonspecific and most likely > self-deprecating as much as insulting. > * I

Re: Speeding up permutations generation

2015-03-06 Thread Gene Heskett
On Friday 06 March 2015 11:30:08 Dave Angel wrote: > On 03/06/2015 11:14 AM, Gene Heskett wrote: > > On Friday 06 March 2015 06:22:34 Dave Angel wrote: > >> Sorry, but 50! is not even close to 50**50. The latter is 85 > >> digits as you say, but 50! is "only" 64. > >> > >> > >> 30414093201713378

Re: Newbie question about text encoding

2015-03-06 Thread Rustom Mody
On Friday, March 6, 2015 at 8:20:22 PM UTC+5:30, Steven D'Aprano wrote: > Rustom Mody wrote: > > > On Friday, March 6, 2015 at 10:50:35 AM UTC+5:30, Chris Angelico wrote: > > [snip example of an analogous situation with NULs] > > > Strawman. > > Sigh. If I had a dollar for every time somebody c

Re: Is nan in (nan,) correct?

2015-03-06 Thread Steven D'Aprano
Rustom Mody wrote: > On Friday, March 6, 2015 at 3:57:12 AM UTC+5:30, rand...@fastmail.us > wrote: >> It's been brought up on Stack Overflow that the "in" operator (on >> tuples, and by my testing on dict and list, as well as dict lookup) uses >> object identity as a shortcut, and returns true imm

Re: Newbie question about text encoding

2015-03-06 Thread Steven D'Aprano
random...@fastmail.us wrote: > My point is there are very few > problems to which "count of Unicode code points" is the only right > answer - that UTF-32 is good enough for but that are meaningfully > impacted by a naive usage of UTF-16, to the point where UTF-16 is > something you have to be "saf

Re: Newbie question about text encoding

2015-03-06 Thread Chris Angelico
On Sat, Mar 7, 2015 at 3:20 AM, Rustom Mody wrote: > C's string is not bug-prone its plain buggy as it cannot represent strings > with nulls. > > I would not go that far for UTF-16. > It is bug-inviting but it can also be implemented correctly C's standard library string handling functions are re

Re: Speeding up permutations generation

2015-03-06 Thread Wolfgang Maier
On 03/06/2015 05:14 PM, Gene Heskett wrote: On Friday 06 March 2015 06:22:34 Dave Angel wrote: 30414093201713378043612608166064768844377641568960512L What utility output that as an L ? One called the python interactive interpreter used by many people on this list (though it

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-06 Thread Mark Lawrence
On 06/03/2015 11:53, alister wrote: On Fri, 06 Mar 2015 14:23:22 +1100, Ben Finney wrote: No. I'm saying that it's clear the person saying “get their panties all up in a bunch” fully intends to convey specifically *female* underwear, and thereby to use implied femininity as an insult. Yes, of

Re: Speeding up permutations generation

2015-03-06 Thread Dave Angel
On 03/06/2015 11:14 AM, Gene Heskett wrote: On Friday 06 March 2015 06:22:34 Dave Angel wrote: Sorry, but 50! is not even close to 50**50. The latter is 85 digits as you say, but 50! is "only" 64. 30414093201713378043612608166064768844377641568960512L What utility output th

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-06 Thread llanitedave
On Wednesday, March 4, 2015 at 6:50:32 PM UTC-8, sohca...@gmail.com wrote: > On Wednesday, March 4, 2015 at 5:34:16 PM UTC-8, Xrrific wrote: > > Guys, please Help!!! > > > > I am trying to impress a girl who is learning python and want ask her out > > at the same time. > > > > Could you please c

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-06 Thread llanitedave
On Friday, March 6, 2015 at 2:03:42 AM UTC-8, Marko Rauhamaa wrote: > Rustom Mody : > > > I really dont understand what we are communicating (or not) about... > > > > Can you hear my accent? > > If we met at a Python conference, I would hear it and hopefully even > understand it. > > > But more

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-06 Thread Ian Kelly
On Fri, Mar 6, 2015 at 4:53 AM, alister wrote: > I have not seen one female poster on this site claim to be offended by > the comment or even consider it to be a slur. > > I doubt that the original poster of the comment intended it to be either > & most people reading it would have known that (reg

Re: Speeding up permutations generation

2015-03-06 Thread Gene Heskett
On Friday 06 March 2015 06:22:34 Dave Angel wrote: > On 03/06/2015 05:32 AM, Gene Heskett wrote: > > On Friday 06 March 2015 03:24:48 Abhiram R wrote: > >>> A list of 100 elements has approximately 9.33 x 10**157 > >>> permutations. If you could somehow generate one permutation every > >>> yoctos

Re: Is nan in (nan,) correct?

2015-03-06 Thread Grant Edwards
On 2015-03-06, Chris Angelico wrote: > On Fri, Mar 6, 2015 at 8:50 PM, Rustom Mody wrote: >> In a language like python with decent exceptions we do not need nans. > > Not so. I could perhaps accept that we don't need signalling NaNs, as > they can be replaced with exceptions, but quiet NaNs are b

Re: Newbie question about text encoding

2015-03-06 Thread Chris Angelico
On Sat, Mar 7, 2015 at 1:50 AM, Steven D'Aprano wrote: > Rustom Mody wrote: > >> On Friday, March 6, 2015 at 10:50:35 AM UTC+5:30, Chris Angelico wrote: > > [snip example of an analogous situation with NULs] > >> Strawman. > > Sigh. If I had a dollar for every time somebody cried "Strawman!" when

Re: Newbie question about text encoding

2015-03-06 Thread Steven D'Aprano
Rustom Mody wrote: > On Friday, March 6, 2015 at 10:50:35 AM UTC+5:30, Chris Angelico wrote: [snip example of an analogous situation with NULs] > Strawman. Sigh. If I had a dollar for every time somebody cried "Strawman!" when what they really should say is "Yes, that's a good argument, I'm afr

Re: Newbie question about text encoding

2015-03-06 Thread random832
On Fri, Mar 6, 2015, at 09:11, Chris Angelico wrote: > To prevent people from putting three paragraphs of lipsum in and > calling it a username. Limiting by UTF-8 bytes or UTF-16 units works just as well for that. > So you truncate to the desired length, then if the first character of > the trimm

Re: Newbie question about text encoding

2015-03-06 Thread Chris Angelico
On Sat, Mar 7, 2015 at 1:03 AM, wrote: > On Fri, Mar 6, 2015, at 08:39, Chris Angelico wrote: >> Number of code points is the most logical way to length-limit >> something. If you want to allow users to set their display names but >> not to make arbitrarily long ones, limiting them to X code poin

Re: Newbie question about text encoding

2015-03-06 Thread random832
On Fri, Mar 6, 2015, at 08:39, Chris Angelico wrote: > Number of code points is the most logical way to length-limit > something. If you want to allow users to set their display names but > not to make arbitrarily long ones, limiting them to X code points is > the safest way (and preferably do an N

Re: io.open vs. codecs.open

2015-03-06 Thread Albert-Jan Roskam
- Original Message - > From: Steven D'Aprano > To: python-list@python.org > Cc: > Sent: Wednesday, March 4, 2015 8:56 PM > Subject: Re: io.open vs. codecs.open > > Albert-Jan Roskam wrote: > >> Hi, >> >> Is there a (use case) difference between codecs.open and io.open? What is >>

Re: Newbie question about text encoding

2015-03-06 Thread Chris Angelico
On Sat, Mar 7, 2015 at 12:33 AM, wrote: > However, when do you _really_ want the number of characters? You may > want to use it for, for example, the number of columns in a 'monospace' > font, which you've already screwed up because you haven't accounted for > double-wide characters or combining

Re: Newbie question about text encoding

2015-03-06 Thread random832
On Fri, Mar 6, 2015, at 04:06, Rustom Mody wrote: > Also: > Can a programmer who is away from UTF-16 in one part of the system (say > by using python3) > assume he is safe all over? The most common failure of UTF-16 support, supposedly, is in programs misusing the number of code units (for length

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-06 Thread alister
On Fri, 06 Mar 2015 08:31:40 +, Mark Lawrence wrote: > On 06/03/2015 08:00, Rustom Mody wrote: >> On Thursday, March 5, 2015 at 10:49:54 AM UTC+5:30, Marko Rauhamaa >> wrote: >>> Rustom Mody: >>> You keep talking of accent. At first I thought you were using the word figuratively or e

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-06 Thread Steve Hayes
On Fri, 6 Mar 2015 00:00:28 -0800 (PST), Rustom Mody wrote: >On Thursday, March 5, 2015 at 10:49:54 AM UTC+5:30, Marko Rauhamaa wrote: >> Rustom Mody: >> >> > You keep talking of accent. >> > At first I thought you were using the word figuratively or else joking. >> > Im now beginning to wonder

Re: Speeding up permutations generation

2015-03-06 Thread Chris Angelico
On Fri, Mar 6, 2015 at 9:33 PM, Mark Lawrence wrote: >> Is the actual generation of permutations your problem? You mentioned >> that you're using itertools, so I would expect that you're simply >> iterating over that; I hope you're not immediately trying to construct >> a list of them all, because

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-06 Thread alister
On Fri, 06 Mar 2015 14:23:22 +1100, Ben Finney wrote: > > No. I'm saying that it's clear the person saying “get their panties all > up in a bunch” fully intends to convey specifically *female* underwear, > and thereby to use implied femininity as an insult. > > Yes, of course I know some people

Re: Speeding up permutations generation

2015-03-06 Thread Dave Angel
On 03/06/2015 01:44 AM, Abhiram R wrote: Hi all, Is there a way to generate permutations of large arrays of sizes say,in the hundreds, faster than in the time itertools.permutations() can return? When dealing with large loops like that (or even permutations of 50, which is also gy-normous [1]

Re: Speeding up permutations generation

2015-03-06 Thread Dave Angel
On 03/06/2015 05:32 AM, Gene Heskett wrote: On Friday 06 March 2015 03:24:48 Abhiram R wrote: A list of 100 elements has approximately 9.33 x 10**157 permutations. If you could somehow generate one permutation every yoctosecond, exhausting them would still take more than a hundred orders of ma

Re: Speeding up permutations generation

2015-03-06 Thread Mark Lawrence
On 06/03/2015 09:59, Chris Angelico wrote: On Fri, Mar 6, 2015 at 7:24 PM, Abhiram R wrote: A list of 100 elements has approximately 9.33 x 10**157 permutations. If you could somehow generate one permutation every yoctosecond, exhausting them would still take more than a hundred orders of magni

Re: Speeding up permutations generation

2015-03-06 Thread Gene Heskett
On Friday 06 March 2015 03:24:48 Abhiram R wrote: > > A list of 100 elements has approximately 9.33 x 10**157 > > permutations. If you could somehow generate one permutation every > > yoctosecond, exhausting them would still take more than a hundred > > orders of magnitude longer than the age of

Re: Is nan in (nan,) correct?

2015-03-06 Thread Rustom Mody
On Friday, March 6, 2015 at 3:31:58 PM UTC+5:30, Chris Angelico wrote: > On Fri, Mar 6, 2015 at 8:50 PM, Rustom Mody wrote: > > In a language like python with decent exceptions we do not need nans. > > Not so. I could perhaps accept that we don't need signalling NaNs, as > they can be replaced wi

Re: Newbie question about text encoding

2015-03-06 Thread Rustom Mody
On Friday, March 6, 2015 at 3:24:48 PM UTC+5:30, Chris Angelico wrote: > On Fri, Mar 6, 2015 at 8:02 PM, Rustom Mody wrote: > >> Broken systems can be shown up by anything. Suppose you have a program > >> that breaks when it gets a NUL character (not unknown in C code); is > >> the fault with the U

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-06 Thread Marko Rauhamaa
Mark Lawrence : > British accent, Christmas is early this year so ho, ho, ho. Nobody in > this country ever guesses where I was born and bred, they all think > I'm from the South West or the West Country. Irish, Scottish, Welsh, > English alone are different. Most foreigners wouldn't have a dog's

Re: Python Worst Practices

2015-03-06 Thread Chris Angelico
On Fri, Mar 6, 2015 at 5:58 PM, Jonas Wielicki wrote: > On 01.03.2015 03:43, Chris Angelico wrote: >> Imagine if all >> your Python code ran twice as fast (that's slightly better than the >> IronPython figure quoted!), but worked only on BSD Unix and Mac OS. Is >> that something that'll make a fle

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-06 Thread Marko Rauhamaa
Rustom Mody : > I really dont understand what we are communicating (or not) about... > > Can you hear my accent? If we met at a Python conference, I would hear it and hopefully even understand it. > But more to the point its still not clear (to me) whether you are objecting to > - to Mark > - to

Re: Is nan in (nan,) correct?

2015-03-06 Thread Chris Angelico
On Fri, Mar 6, 2015 at 8:50 PM, Rustom Mody wrote: > In a language like python with decent exceptions we do not need nans. Not so. I could perhaps accept that we don't need signalling NaNs, as they can be replaced with exceptions, but quiet NaNs are by definition _not_ exceptions. ChrisA -- htt

Re: Speeding up permutations generation

2015-03-06 Thread Chris Angelico
On Fri, Mar 6, 2015 at 7:24 PM, Abhiram R wrote: >> A list of 100 elements has approximately 9.33 x 10**157 permutations. >> If you could somehow generate one permutation every yoctosecond, >> exhausting them would still take more than a hundred orders of >> magnitude longer than the age of the un

Re: Is nan in (nan,) correct?

2015-03-06 Thread Rustom Mody
On Friday, March 6, 2015 at 3:57:12 AM UTC+5:30, rand...@fastmail.us wrote: > It's been brought up on Stack Overflow that the "in" operator (on > tuples, and by my testing on dict and list, as well as dict lookup) uses > object identity as a shortcut, and returns true immediately if the > object be

Re: Newbie question about text encoding

2015-03-06 Thread Chris Angelico
On Fri, Mar 6, 2015 at 8:02 PM, Rustom Mody wrote: >> Broken systems can be shown up by anything. Suppose you have a program >> that breaks when it gets a NUL character (not unknown in C code); is >> the fault with the Unicode consortium for allocating something at >> codepoint 0, or the code that

Re: Newbie question about text encoding

2015-03-06 Thread Rustom Mody
On Friday, March 6, 2015 at 2:33:11 PM UTC+5:30, Rustom Mody wrote: > Lets please stick to UTF-16 shall we? > > Now tell me: > - Is it broken or not? > - Is it widely used or not? > - Should programmers be careful of it or not? > - Should programmers be warned about it or not? Also: Can a program

Re: Newbie question about text encoding

2015-03-06 Thread Rustom Mody
On Friday, March 6, 2015 at 10:50:35 AM UTC+5:30, Chris Angelico wrote: > On Fri, Mar 6, 2015 at 3:53 PM, Rustom Mody wrote: > > My conclusion: Early adopters of unicode -- Windows and Java -- were > > punished > > for their early adoption. You can blame the unicode consortium, you can > > blame

Re: Speeding up permutations generation

2015-03-06 Thread Wolfgang Maier
On 03/06/2015 09:34 AM, Mark Lawrence wrote: On 06/03/2015 06:44, Abhiram R wrote: Hi all, Is there a way to generate permutations of large arrays of sizes say,in the hundreds, faster than in the time itertools.permutations() can return? ​-Abhiram.R /~Never give up/ If there is I'd guess tha

Re: Speeding up permutations generation

2015-03-06 Thread Mark Lawrence
On 06/03/2015 06:44, Abhiram R wrote: Hi all, Is there a way to generate permutations of large arrays of sizes say,in the hundreds, faster than in the time itertools.permutations() can return? ​-Abhiram.R /~Never give up/ If there is I'd guess that you'd use numpy http://www.numpy.org/. The

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-06 Thread Mark Lawrence
On 06/03/2015 08:00, Rustom Mody wrote: On Thursday, March 5, 2015 at 10:49:54 AM UTC+5:30, Marko Rauhamaa wrote: Rustom Mody: You keep talking of accent. At first I thought you were using the word figuratively or else joking. Im now beginning to wonder if you mean it literally. If so have you

Re: Speeding up permutations generation

2015-03-06 Thread Abhiram R
> > A list of 100 elements has approximately 9.33 x 10**157 permutations. > If you could somehow generate one permutation every yoctosecond, > exhausting them would still take more than a hundred orders of > magnitude longer than the age of the universe. > -- > https://mail.python.org/mailman/listi

Re: Make standalone gui-enabled app for LINUX

2015-03-06 Thread Mehdi
I have no experience with pyqt and so pyqtdeploy but it seems what i need. > I haven't announced this on the list yet, but... > > http://pyqt.sourceforge.net/Docs/pyqtdeploy/ > > Phil But i think pyinstaller doesn't work with python3. On Friday, March 6, 2015 at 12:58:11 AM UTC+3:30, Christ

Re: How fast does your grass grow? [was Re: HELP!! How to ask a girl out with a simple witty Python code??]

2015-03-06 Thread Chris Angelico
On Fri, Mar 6, 2015 at 2:48 PM, Ethan Furman wrote: > On 03/05/2015 07:37 PM, Chris Angelico wrote: > >> I'm sure there's something more interesting to talk about... like the >> rate at which the grass is growing. > > My grass doesn't grow -- I ripped it all out and put down pea-gravel and > plan

Re: Speeding up permutations generation

2015-03-06 Thread Ian Kelly
On Thu, Mar 5, 2015 at 11:44 PM, Abhiram R wrote: > Hi all, > Is there a way to generate permutations of large arrays of sizes say,in the > hundreds, faster than in the time itertools.permutations() can return? A list of 100 elements has approximately 9.33 x 10**157 permutations. If you could som

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-06 Thread Rustom Mody
On Thursday, March 5, 2015 at 10:49:54 AM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody: > > > You keep talking of accent. > > At first I thought you were using the word figuratively or else joking. > > Im now beginning to wonder if you mean it literally. > > If so have you patented a new AOIP pro