Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Mark H Harris
On 3/21/14 12:42 PM, Marko Rauhamaa wrote: http://docs.python.org/3/library/subprocess.html#popen-constructor> It's got the optional close_fds parameter, which is True by default. IOW, you don't need to do anything if you use subprocess.Popen() to start your child process. Incidentally,

Re: Installing ssdeep on Portable Python /advice

2014-03-21 Thread Mark H Harris
On 3/20/14 7:16 PM, laguna...@mail.com wrote: $ tar -zxvf ssdeep-2.10.tar.gz $ cd ssdeep-2.10&& ./configure&& make&& sudo make install I need install it on PortablePython for Windows, so it's not clear how to make this: where should be placed ssdeep Windows binary files, that Pyt

Re: Installing ssdeep on Portable Python /advice

2014-03-21 Thread Mark H Harris
On 3/21/14 9:51 PM, Mark H Harris wrote: On 3/20/14 7:16 PM, laguna...@mail.com wrote: $ tar -zxvf ssdeep-2.10.tar.gz $ cd ssdeep-2.10&& ./configure&& make&& sudo make install I need install it on PortablePython for Windows, so it's not clear how to make this:

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 5:44 PM, Mark Lawrence wrote: I'm pleased to see that you have answers. In return would you either use the mailing list https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 11:15 PM, Chris Angelico wrote: It compounds. One reply makes for double spacing... two makes quadruple, three means we have seven wasted lines between every pair of real lines. That gets pretty annoying. And considering that most people who reply without cleaning up the lines also kee

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 11:30 PM, Mark H Harris wrote: All OS's should comply with the standard... for instance, there should not be a windows x'0a' x'0d' line ending, and a unix x'0d' line ending. whoops... I meant unix x'0a' line ending...;-)

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-21 Thread Mark H Harris
On 3/21/14 11:39 PM, Rustom Mody wrote: Given fl = [lambda y : x+y for x in [1,2,3]] It means: def rec(l): if not l: return [] else: x,ll = l[0],l[1:] return [lambda y: x + y] + rec(ll) followed by fl = rec([1,2,3]) Naturally a reasonable *implementation* would ca

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 11:46 PM, Chris Angelico wrote: (Side point: You have your 0d and your 0a backwards; the Unix line ending is U+000A, and the Windows default is U+000D U+000A.) Yeah, I know... smart apple. How are you going to make people change? What are you going to make them change to? Who co

Re: python installation on windows

2014-03-23 Thread Mark H Harris
On 3/23/14 4:07 PM, tad na wrote: On Sunday, March 23, 2014 12:33:02 PM UTC-5, tad na wrote: To set up a web browser: 1.open a dos window 2.navigate to dir you want "served" 3.type "python -m SimpleHTTPServer &." 4. open browser and type http://localhost:/ That is very ~cool. I learn

Re: loop

2014-03-23 Thread Mark H Harris
On 3/23/14 7:59 PM, anton wrote: for i in (10**p for p in range(3, 8)): print(i) Never do their home-work for them; but, in this case, what the heck. :) -- https://mail.python.org/mailman/listinfo/python-list

Re: Reading in cooked mode (was Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary)

2014-03-23 Thread Mark H Harris
On 3/23/14 10:17 PM, Chris Angelico wrote: Newline style IS relevant. You're saying that this will copy a file perfectly: out = open("out", "w") for line in open("in"): out.write(line) but it wouldn't if the iteration and write stripped and recreated newlines? Incorrect, because this versi

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-23 Thread Mark H Harris
On 3/22/14 4:46 AM, Steven D'Aprano wrote: On Fri, 21 Mar 2014 23:51:38 -0500, Mark H Harris wrote: Lambda is a problem, if only because it causes confusion. What's the problem? Glad you asked. The constructs DO NOT work the way most people would expect them to, having limited kn

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-24 Thread Mark H Harris
On 3/24/14 4:58 AM, Mark Lawrence wrote: Where do you get reduce from if it's not in the standard library? That was "a" proposal for 3000. Its there, but its not on the built-ins; ie., you have to import it. The confusion: why reduce, why not filter, nor map? {rhetorical} As for lambd

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-24 Thread Mark H Harris
On 3/24/14 4:49 AM, Steven D'Aprano wrote: There's no doubt that lambda is less-often useful than is the def statement. But not only is it still useful, but there is a continual stream of people asking for Python to make it *more useful* by allowing the body of a lambda to be a full block, not ju

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-24 Thread Mark H Harris
On 3/24/14 4:03 AM, Ian Kelly wrote: The difference does not really lie in the lambda construct per se but in the binding style of closures. Functional languages tend to go one way here; imperative languages tend to go the other. {snip} The result may be more surprising to users accustomed to

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-24 Thread Mark H Harris
On 3/24/14 6:01 PM, Chris Angelico wrote: Easy fix. Use the "explicit capture" notation: adders[n] = lambda a, n=n: a+n And there you are, out of your difficulty at once! Yes, yes, yes, and example: adders= list(range(4)) for n in adders: >adders[n] = lambda a, n=n: a+n >

Re: Reading in cooked mode (was Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary)

2014-03-24 Thread Mark H Harris
On 3/24/14 6:30 PM, Dennis Lee Bieber wrote: {And I recall standard practice was to hit \r, to return the carriage, \n for next line, and one RUBOUT to provide a delay while the carriage returned to the left} Yes, yes... I remember well, there had to be a delay (of some type) to wait for the h

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-24 Thread Mark H Harris
On 3/24/14 5:43 PM, Marko Rauhamaa wrote: Mark H Harris: Yes, its about closures, totally; the most confusing aspect of lambda in python is not only the syntax but the idea of scope and closure (for that syntax). Everyone is confused by this initially, not because its complicated, but

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-24 Thread Mark H Harris
On 3/24/14 7:11 PM, Chris Angelico wrote: On Tue, Mar 25, 2014 at 10:56 AM, Mark H Harris wrote: What is needed is the explicit closure "grab" recommended by ChrisA. Which does work. You do know why, right? Sure. ... but again, that's not the point. The point is NOT can y

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-24 Thread Mark H Harris
On 3/24/14 7:32 PM, Mark Lawrence wrote: marcus I'd vote to have lambda taken out of the language if it meant avoiding tedious threads like this one :( Dude, you remind me of Eeyore; "days, weeks, months, who knows..." Its just a conversation. Don't setup a polling booth yet. Its all i

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-24 Thread Mark H Harris
On 3/22/14 3:59 PM, vasudevram wrote: Thanks to all those who answered. - Vasudev I am wondering if the question was answered? x = [[1,2],[3,4],[5,6]] import ast ast.dump(ast.parse('[x for x in x for x in x]')) > "Module(body= > [Expr(value=ListComp(elt=Name(id='x', ctx=Load()), > g

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-24 Thread Mark H Harris
On 3/24/14 8:20 PM, Terry Reedy wrote: On 3/24/2014 7:56 PM, Mark H Harris wrote: the list which is used for each of the adder[] functions created. Wrong. Functions look up global and nonlocal names, such as n, when the function is called. hi Terry, yeah, I know; this is what's *

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/24/14 10:00 PM, Rustom Mody wrote: About time we started using unicode in earnest dont you think?? Id like to see the following spellings corrected: lambda to λ great idea! {snip} [And now I hand it over to our very dear resident troll to explain the glories of the FSR] Now, that'

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/24/14 10:17 PM, Chris Angelico wrote: On Tue, Mar 25, 2014 at 2:00 PM, Rustom Mody wrote: Yeah: Its 2014 (at least out here)... About time we started using unicode in earnest dont you think?? We do. Id like to see the following spellings corrected: lambda to λ in to ∈ (preferably with

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/24/14 10:25 PM, Mark H Harris wrote: but, rats, can't find \ lambda Ok, there we go -> λ and ∈ and ∉ and ∀ no problem. -- https://mail.python.org/mailman/listinfo/python-list

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-24 Thread Mark H Harris
On 3/24/14 8:45 PM, Steven D'Aprano wrote: Your insistence that lambda is confusing is awfully condescending. People are not as dumb as you insist, and they are perfectly capable of learning lambda without a comp sci degree. Like any technical jargon, there is vocabulary and meaning to learn, bu

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/24/14 10:51 PM, Chris Angelico wrote: Supporting both may look tempting, but you effectively create two ways of spelling the exact same thing; it'd be like C's trigraphs. Do you know what ??= is, This was a fit for me, back in the day IBM (system36 & system38). When we started supporting

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/25/14 12:08 AM, Chris Angelico wrote: How quickly can you switch, type one letter (to generate one Cyrillic character), and switch back? ... very fast. Is not this nicer? >>> Π = pi >>> >>> sin(Π/4) 0.7071067811865475 >>> >>> cos(Π/4) 0.7071067811865476 >>> my pdeclib constants exte

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/25/14 12:27 AM, Chris Angelico wrote: my pdeclib constants extension will have alternate spellings for Π and Γ and Δ and others... That's good! (Although typing Π quicker than pi is majorly pushing it. Well, I'll tell ya, its exactly the same--- two key-strokes, believe it or not.

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/25/14 12:28 AM, Rustom Mody wrote: π = pi sin(π/4) 0.7071067811865475 cos(π/4) 0.7071067811865476 Looks better in emacs Input with tex mode -- 1 char to switch slightly verbose to type -- \pi gives π \Pi gives Π Whoohoo... yes, way more betterer/ :) -- https://mail.python.org/mailma

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/25/14 12:42 AM, Rustom Mody wrote: You are not counting mouse For an emacs user Looking at mouse counts as 3 keystrokes ha! I would not be surprised that just "thinking" about the mouse might be worth 3 key-strokes for an emacs user! I use vi all the time; emacs less; depends on the

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/25/14 12:48 AM, Chris Angelico wrote: Yup. Welcome to timezones. I'm UTC +11 here, although we'll drop back to +10 shortly as DST finishes (yay!). It's currently 0547 UTC, so you're presumably five hours behind UTC, which would put you east coast USA, most likely. (Especially since your mail

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/25/14 12:48 AM, Chris Angelico wrote: (Especially since your mailer is putting the dates as mm/dd/yy, which is an abomination peculiar to Americans.) I did not know that; so is 25 Mar 2014 the preferred way? marcus -- https://mail.python.org/mailman/listinfo/python-list

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-24 Thread Mark H Harris
On 3/25/14 12:08 AM, Chris Angelico wrote: How quickly can you switch, type one letter (to generate one Cyrillic character), and switch back? Ok.. after installing Ukelete from Summer Institute of Linguistics SIL I can now edit the installed keymaps and select them from input sources at the t

Re: [newbie] confusion concerning fetching an element in a 2d-array

2014-03-25 Thread Mark H Harris
On 3/25/14 9:42 AM, Dave Angel wrote: All I need is a little python-example reading a file with e.g. three lines with three numbers per line and putting those numbers as floats in a 3x3-numpy_array, then selecting an element from that numpy_array using it's row and column-number. If your instr

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-25 Thread Mark H Harris
On 3/25/14 7:36 AM, Roy Smith wrote: (we're on one tiny planet, you know?) Speak for yourself. Are others on this list, um, on a different planet? Or, am I the only one who knows its tiny? Yes, we're on a tiny planet revolving around a speck of a star, at the edge of an insignificant

unicode as valid naming symbols

2014-03-25 Thread Mark H Harris
greetings, I would like to create a lamda as follows: √ = lambda n: sqrt(n) On my keyboard mapping the "problem" character is alt-v which produces the radical symbol. When trying to set the symbol as a name within the name-space gives a syntax error: >>> from math import sqrt >>> >>> √ = la

Re: unicode as valid naming symbols

2014-03-25 Thread Mark H Harris
On 3/25/14 1:52 PM, wxjmfa...@gmail.com wrote: '√'.isidentifier() > False 'λ'.isidentifier() > True > S.isidentifier() -> bool > > Return True if S is a valid identifier according > to the language definition. > > cf "unicode.org" doc Excellent, thanks! marcus -- https://mail.py

Re: unicode as valid naming symbols

2014-03-25 Thread Mark H Harris
On 3/25/14 2:24 PM, MRAB wrote: > It's explained in PEP 3131. > > Basically, a name should to start with a letter (this has been extended > to include Chinese characters, etc) or an underscore. > > λ is a classified as Lowercase_Letter. > > √ is classified as Math_Symbol. Thanks much! I'll no

Re: unicode as valid naming symbols

2014-03-27 Thread Mark H Harris
On 3/25/14 6:58 PM, Steven D'Aprano wrote: To quote a great Spaniard: “You keep using that word, I do not think it means what you think it means.” In~con~theveable ! My name is Inigo Montoya, you killed my father, prepare to die... Do you think that the ability to write

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-27 Thread Mark H Harris
On 3/26/14 1:35 AM, alex23 wrote: On 25/03/2014 12:39 PM, Mark H Harris wrote: my version semantically is "how it is perceived" by the user Could you please stop claiming to have insight into the comprehension of anyone other than yourself? Hasty generalisations don't help your

Re: unicode as valid naming symbols

2014-03-27 Thread Mark H Harris
On 3/27/14 10:51 AM, Rustom Mody wrote: Observe: Good ol infix -- x+y.. prefix (with paren) -- foo(x) prefix without -- ¬ x In case you thought alphanumerics had parens -- sin x Then theres postfix -- n! Inside fix -- nCr (Or if you prefer ⁿCᵣ ??) And outside fix -- mod -- |x| And Ive pro

Re: Reading in cooked mode (was Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary)

2014-03-27 Thread Mark H Harris
On 3/25/14 6:38 PM, Dennis Lee Bieber wrote: A couple of us managed to "steal" the school login/password (don't think we ever used it, but...)... The teaching assistant didn't notice the paper tape punch was active when persuaded to login to let us run a short program (high school BASIC

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-27 Thread Mark H Harris
On 3/27/14 11:10 AM, Chris Angelico wrote: On Fri, Mar 28, 2014 at 2:44 AM, Mark H Harris wrote: My comments here are not in the least hasty, nor are they generalizations. They are based on long years of experience with "normal" users, {snip} Who is a "normal user"?

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-27 Thread Mark H Harris
On 3/27/14 11:48 AM, Chris Angelico wrote: On Fri, Mar 28, 2014 at 3:37 AM, Mark H Harris wrote: For the purposes of this list, a "normal" user is a reasonably intelligent college educated non "computer professional" non "computer scientist" non "expert&quo

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-27 Thread Mark H Harris
On 3/27/14 4:42 PM, Chris Angelico wrote: And this is the bit where, I think, we disagree. I think that programming is for programmers, in the same way that music is for musicians and the giving of legal advice is for lawyers. Yes, there are armchair lawyers, and plenty of people can pick up a hy

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-28 Thread Mark H Harris
On 3/27/14 7:34 PM, Steven D'Aprano wrote: > As for enormous number of users who will have > difficulty typing √ in their source code, they certainly don't count! > It's good enough that *you* have a solution to that problem, you can type > alt-v, and anyone who can't simply doesn't matter. You h

Howto flaten a list of lists was (Explanation of this Python language feature)

2014-03-28 Thread Mark H Harris
On Fri, Mar 21, 2014 at 1:42 PM, vasudevram wrote: >> Can anyone - maybe one of the Python language core team, or someone >> with knowledge of the internals of Python - can explain why this >> code works, and whether the different occurrences of the name x in >> the expression, are in differen

How to flatten a list of lists was (Explanation of this Python language feature?)

2014-03-28 Thread Mark H Harris
On 3/27/14 6:45 PM, Dan Stromberg wrote: On Fri, Mar 21, 2014 at 1:42 PM, vasudevram wrote: Can anyone - maybe one of the Python language core team, or someone with knowledge of the internals of Python - can explain why this code works, and whether the different occurrences of the name x in the

To flatten a nested list was (Explanation of this Python language feature? [x for x in x for x in x]

2014-03-28 Thread Mark H Harris
On 3/27/14 6:45 PM, Dan Stromberg wrote: x = [[1,2], [3,4], [5,6]] [x for x in x for x in x] I'll give this +1 for playfulness, and -2 for lack of clarity. I hope no one thinks this sort of thing is good to do in real-life code. You might try this to flatten a list of lists: >>> from

Re: Howto flaten a list of lists was (Explanation of this Python language feature)

2014-03-28 Thread Mark H Harris
On 3/28/14 5:12 PM, Mark Lawrence wrote: No. This has to be a better way to flatten lists: >>> from functools import reduce >>> import operator as λ >>> reduce(λ.add, l) [1, 2, 3, 4, 5, 6, 7, 8, 9] Why reinvent yet another way of flattening lists, particulary one that doesn't use the fa

Re: Howto flaten a list of lists was (Explanation of this Python language feature)

2014-03-28 Thread Mark H Harris
On 3/28/14 9:33 PM, Steven D'Aprano wrote: Mark, please stop posting to the newsgroup comp.lang.python AND the mailing list python-list@python.org. They mirror each other. Your posts are not so important that we need to see everything twice. Its not my fault, Steven. Something goofy is going on

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-28 Thread Mark H Harris
On 3/28/14 9:45 PM, Chris Angelico wrote: On Sat, Mar 29, 2014 at 8:18 AM, Mark H Harris wrote: We have a unicode system [1] capable of zillions of characters, and most of [us] have some qwerty system keyboard [104 keys?] with meta key mappings for a few more. Talk about the cart before the

Re: To flatten a nested list was (Explanation of this Python language feature? [x for x in x for x in x]

2014-03-28 Thread Mark H Harris
On 3/28/14 9:31 PM, Steven D'Aprano wrote: On Fri, 28 Mar 2014 17:05:15 -0500, Mark H Harris wrote: >>> from functools import reduce >>> L = [[1,2,3],[4,5,6],[7],[8,9]] >>> import operator as λ >>> reduce(λ.add, L) [1, 2, 3, 4, 5,

Re: Howto flaten a list of lists was (Explanation of this Python language feature)

2014-03-28 Thread Mark H Harris
On 3/28/14 10:21 PM, Chris Angelico wrote: Well, something's causing your messages to come out multiple times and with different subject lines :) I changed the subject line ( which I did twice because the first post said it had an error and did not post; which apparently was a lie). Th

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-28 Thread Mark H Harris
On 3/28/14 10:51 PM, Steven D'Aprano wrote: Why must everyone in the world be stuck with a U.S. Royal typewriter keyboard for two or three hundred years? You are being patronising to the 94% of the world that is not from the USA. Do you honestly think that people all over the world have been u

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-28 Thread Mark H Harris
On 3/28/14 11:07 PM, Mark H Harris wrote: Think, virtual keyboard, on a keytoplayout... but separate from any touchable screen. And, think mac keytops (or flatter) not the plastic IBM typewriter like keyboards of today. Think beyond. What if~ when I select my UK standard keytop mappings (from

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-28 Thread Mark H Harris
On 3/28/14 11:16 PM, Mark H Harris wrote: I am able to type in Greek, well I've been doing it for about 12 years, but it would be s much better if the keytopsection actually morphed. What if, when you opened your new computer in Botswana, and you selected your language in gnu/linux

Re: Keyboard standards

2014-03-28 Thread Mark H Harris
On 3/28/14 11:18 PM, Ben Finney wrote: On the inexpensive end, Think Penguin will also happily ship Tux logo stickers to go on top of the Super key https://www.thinkpenguin.com/gnu-linux/tux-super-key-keyboard-sticker>. That's ~cool. I can now remove that nasty M$ meta key. Actually, I got so

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-28 Thread Mark H Harris
On 3/28/14 10:51 PM, Steven D'Aprano wrote: You are being patronising to the 94% of the world that is not from the USA. Do you honestly think that people all over the world have been using computers for 30 or 40 years without any way to enter their native language? uh, pretty much. That's why

Re: Keyboard standards

2014-03-28 Thread Mark H Harris
On 3/29/14 12:13 AM, Chris Angelico wrote: When I first met Windows keys, I just popped 'em off and left a gap. Worked fine. ha! see.. it popped you off too! :-)) I found it arrogant to the max to place their stupid logo on (my) keyboard. What if every company out there wanted "their" o

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-28 Thread Mark H Harris
On 3/29/14 12:08 AM, Chris Angelico wrote: Okay. History lesson time. Tell me what is the lingua franka today? Is it, E n g l i s h ? For many many many years people all over the earth were using English and ASCII to communicate with early computers... they still are. Almost e

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-29 Thread Mark H Harris
On 3/29/14 1:03 AM, Chris Angelico wrote: http://forum.ecomstation.ru/ Prominent discussion forum, although that strives to be at least partially bilingual in deference to those of us who are so backward as to speak only English. Yes. Well, as the joke goes, if you're trilingual you speak

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-29 Thread Mark H Harris
On 3/29/14 10:45 AM, Mark Lawrence wrote: On 29/03/2014 08:21, Mark H Harris wrote: Yes. Well, as the joke goes, if you're trilingual you speak three languages, if you're bilingual you speak two languages, if you're monolingual you're an American (well, that might

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-29 Thread Mark H Harris
On 3/29/14 6:59 AM, Marko Rauhamaa wrote: I hate localization. You get a error message in Finnish from "make" or "grep" and then you try to google it. So mine is en_US, but I know people who do fi_FI. ... this is my point precisely. -- https://mail.python.org/mailman/listinfo/python-list

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-29 Thread Mark H Harris
On 3/29/14 12:53 PM, Steven D'Aprano wrote: People have had localised code pages, and localised keyboards to enter characters in those code pages, for up to 30 years, if not longer. Nobody is arguing otherwise, Steven. Having a code page for a local language is not the same thing as having

Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?]

2014-03-29 Thread Mark H Harris
On 3/30/14 1:31 AM, Steven D'Aprano wrote: I'm not sure what point you are trying to make. We have people here from all over the earth, and enough illegal immigrants speaking Spanish to account for a population about the size of Ohio. *raises eyebrow* Did you intend to imply that it is only il

Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?]

2014-03-30 Thread Mark H Harris
On 3/30/14 5:35 AM, Steven D'Aprano wrote: On Sun, 30 Mar 2014 01:48:27 -0500, Mark H Harris wrote: Don't be silly, Steven, it doesn't become you. Given the sorts of patronising, condescending things you insist are true about non-Americans, such as their supposed inability

Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?]

2014-03-30 Thread Mark H Harris
On 3/30/14 5:35 AM, Steven D'Aprano wrote: Approximately 5% of the US population either do not speak English at all, or speak it poorly. That includes approximately half a million ASL speakers (American Sign Language, which is not a manual representation of English but an independent language in

Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?]

2014-03-30 Thread Mark H Harris
On 3/30/14 1:31 AM, Steven D'Aprano wrote: The most recent US census found there are 38.5 million people in the US who primarily speak Spanish, and 45 million who speak it as their first or second language. In comparison, there are only an estimated 11 million illegal immigrants (of which only 7

Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?]

2014-03-30 Thread Mark H Harris
On 3/31/14 12:05 AM, Chris Angelico wrote: What say you? We all type in our own language, and everyone else gets to read it in their own language. Its kinda like the day of Pentecost (except that its print instead of audio). And Pentecost required direct intervention of the all-powerful God o

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-30 Thread Mark H Harris
On 3/30/14 10:22 AM, Steven D'Aprano wrote: In 1991, there was no wireless, no mobile computing, hardly any public Internet outside of the universities. It was before the Eternal September, and only a few years after the Great Renaming. I was using arpanet since the late 1970s. Python had

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-01 Thread Mark H Harris
On 3/31/14 3:46 PM, Rhodri James wrote: I was using arpanet since the late 1970s. I was using JANet since the early 80s, and I'm by no means the oldest person here. I should stop playing that card if I were you. My point (which you missed) is not how old I am, rather, for some of us 1

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-01 Thread Mark H Harris
On 4/1/14 4:49 PM, Chris Angelico wrote: On Wed, Apr 2, 2014 at 8:26 AM, Mark H Harris wrote: Python3 finally started getting unicode right. The fact that it 'existed' in some form prior to (3) is not meaningful, nor helpful. When I said, "python has only really used i

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-03 Thread Mark H Harris
On 4/1/14 5:33 PM, Terry Reedy wrote: hi Terry, hope you are well today, despite gmane difficulties; If you narrowly meant "The python interpreter only starting using unicode as the default text class in 3.0", then you are, in that narrow sense, correct. Yes. When I speak of 'python' I

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-03 Thread Mark H Harris
On 4/3/14 12:14 PM, Marko Rauhamaa wrote: Mark H Harris : So, python(3)'s use of unicode is exciting, not only as a step forward for the python interpreter, but also as a leadership step forward in computer science around the world. Big words. I don't think computer science has e

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-03 Thread Mark H Harris
On 4/3/14 5:43 PM, Chris Angelico wrote: So your definition of "useful" for the Decimal module is "fast" and your definition of "useful" for Unicode is "mandated into use". No. I did not define 'useful'. I placed 'useful' on a continuum whereby 'useful' is non definitive & relative. Go re

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-03 Thread Mark H Harris
On 4/3/14 9:07 PM, alex23 wrote: On 4/04/2014 2:38 AM, Mark H Harris wrote: If I speak of the python community, and I rarely do Maybe you speak "of" them rarely but you claim to speak "for" them fairly often. I am sorry, and I do apologize (genuinely). I knowingly

Re: converting strings to hex

2014-04-03 Thread Mark H Harris
On 4/3/14 9:10 PM, dave em wrote: I am taking a cryptography class and am having a tough time with an assignment similar to this. hi Dave, if your instructor wanted you to work on this with other people she would have made it a group project and ordered pizza for everyone. I'll give you so

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-03 Thread Mark H Harris
On 4/3/14 2:43 PM, Marko Rauhamaa wrote: What does computer science have to show of late? A better mutual exclusion algorithm? Dancing trees? Ok, cryptography has been pretty exciting. The back and forth between feasibility and unfeasibility. The ongoing cat and mouse. Computer science i

Re: converting strings to hex

2014-04-03 Thread Mark H Harris
On 4/3/14 10:10 PM, dave em wrote: Thanks, got it. Sometimes the simple things can be difficult. Dave You haven't seen nothing yet, wait till M.L. catches you on the flip side for using gg. {running for cover} marcus -- https://mail.python.org/mailman/listinfo/python-list

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 3:20 AM, Mark Lawrence wrote: On 04/04/2014 03:29, Mark H Harris wrote: Now, about Python2. It has not died. It appears to be 'useful'. {snip} For a lot of people, if it ain't broke, don't fix it. hi Mark, yes that's my point. I have heard rum

Re: converting strings to hex

2014-04-04 Thread Mark H Harris
On 4/4/14 1:16 AM, James Harris wrote: YMMV but I thought the OP had done a good job before asking for help and then asked about only a tiny bit of it. Some just post a question! Indeed they do. Its a little like negotiating with terrorists. As soon as you negotiate with the first one, you

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 4:50 PM, Mark Lawrence wrote: You could answer all of the above for yourself if you were to use your favourite search engine. hi Mark, yeah, condescending as that is, been there done that. See this link as just one example: http://blog.startifact.com/posts/python28-discussion-chann

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 5:39 PM, Chris Angelico wrote: Yes, because python-list responses are *so* much more reliable than official statements on python.org, {/sarcasm off} ... from some responders. The discussion following such posts is also *much* more valuable, too. IMHO Python.org is the political p

Re: converting strings to hex

2014-04-04 Thread Mark H Harris
On 4/4/14 5:36 PM, Chris Angelico wrote: If someone is asking for a hint, it's because s/he is trying to learn. I'm always willing to help someone learn, regardless of whether they're going through a course or currently employed or whatever. Sometimes a small hint can be obtained from the interpr

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 6:16 PM, Mark Lawrence wrote: Fear/panic of a fork, where did that come from? It's certainly the first I've ever heard of it. hi Mark, it came from Ian; or, my interpretation of Ian. It comes out on the net too (from various places). Here is Ian's quote, then my comment: Eventua

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 10:04 PM, Terry Reedy wrote: I am a core developer and I am 99.99% sure that the core developers will not produce a CPython 2.8. For one thing we will likely do instead, see http://legacy.python.org/dev/peps/pep-0466/ Thanks Terry. The back-port sounds great; I find the "Rejected al

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 7:00 PM, Steven D'Aprano wrote: Berp, Brython, CLPython, CPython, CapPython, ChinesePython, Compyler, Copperhead, Cython, HoPe, HotPy, IronPython, Jython, Kivy, Mypy, Mython, Nuitka, Numba, Parakeet, Parallel Python, Perthon, Pippy, Psyco, Py4A, PyMite, PyMT, PyPad, PyPy, PyQNX, PyVM,

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 10:42 PM, Rustom Mody wrote: Computer-hobbyists and computer-professionals are quite different sets of people. I know its just a gut feel, and I know there are a lot of lurkers here too, but it seems that there are *way* more folks from the professional camp on comp.lang.python

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 11:40 PM, Chris Angelico wrote: If it's too much work to make the changes to move something from Python 2.7 to Python 3.3, it's *definitely* too much work to rewrite it in a different language. Totally, no doubt. There would have to be some strong other reason for shifting, espec

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 11:49 PM, Chris Angelico wrote: On Sat, Apr 5, 2014 at 3:31 PM, Mark H Harris wrote: Its has always seemed to me that Java or C++ would be better suited to creating python. I wonder will C always be the standard canonical PSF python interpreter base language? Has the C python

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/5/14 12:02 AM, Ian Kelly wrote: A fork is undesirable because it fragments the community. I don't think "fear" or "panic" are the right words for it. Yes. I get that. I think what is desired (just thinking out loud from my own vantage point) is a unified community, but also a foundat

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/5/14 1:01 AM, Ben Finney wrote: Mark H Harris writes: On 4/5/14 12:02 AM, Ian Kelly wrote: A fork is undesirable because it fragments the community. I don't think "fear" or "panic" are the right words for it. Yes. I get that. So, you get that “fear

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-06 Thread Mark H Harris
On 4/4/14 4:53 AM, Steven D'Aprano wrote: Python is not a computer-science-ey language. Every programming language is interesting from a comp sci standpoint. Some are more useful for research; python is one of those. For what reasons do you disagree? marcus -- https://mail.python.org/mail

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-06 Thread Mark H Harris
On 4/4/14 4:53 AM, Steven D'Aprano wrote: Python is not a computer-science-ey language. Really ? It is of little or no interest to computer scientists involved in the mathematics of computation, ... you mean no one except me, then ? or compiler-theory, or type-theory, or any of the

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-06 Thread Mark H Harris
On 4/4/14 4:53 AM, Steven D'Aprano wrote: > Python is not a computer-science-ey language. Really ? > It is of little or no > interest to computer scientists involved in the mathematics of > computation, ... you mean no one except me, then ? > or compiler-theory, or type-theory, or any o

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-07 Thread Mark H Harris
On 4/6/14 12:31 PM, Rustom Mody wrote: I think python wins because it (usually) lets people do their thing (includes but not limited to CS-research) and gets out of the way. To say therefore that it is irrelevant to the research is a strange inversion of its advantages. I think so too. I f

Re: [OFF-TOPIC] How do I find a mentor when no one I work with knows what they are doing?

2014-04-08 Thread Mark H Harris
On 4/8/14 2:07 AM, James Brewer wrote: I don't think that I have anything to learn from my co-workers, which saddens me because I really like to learn and I know that I have a lot of learning to do. Give it time. The first thing that must happen is relationship building. Initially its about

Re: "Latching" variables in function

2014-04-09 Thread Mark H Harris
On 4/8/14 3:09 PM, Grawburg wrote: I have a N/O pushbutton that I want to "latch" a value to a variable when it's been pressed. I need button_value to become '1' when the button is pressed and to remain '1' until ... What do I use to 'latch' button_value? Philosophically speaking buttons

<    1   2   3   >