Parse config file and command-line arguments, to get a single collection of options

2011-05-25 Thread Ben Finney
for a future offense.” | `\ —Ambrose Bierce, _The Devil's Dictionary_, 1906 | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Puzzled by list-appending behavior

2011-05-25 Thread Uncle Ben
n this to me? Uncle Ben -- http://mail.python.org/mailman/listinfo/python-list

Re: Puzzled by list-appending behavior

2011-05-25 Thread Ben Finney
Uncle Ben writes: > Can someone explain this to me? Yes, the documentation for that function (‘list.append’) can explain it. In short: if a method modifies the instance, that method does not return the instance. This policy holds for the built-in types, and should be followed for user-defi

Re: Puzzled by list-appending behavior

2011-05-26 Thread Uncle Ben
On May 26, 12:46 am, Uncle Ben wrote: > In playing with lists of lists, I found the following: > > (In 3.1, but the same happens also in 2.7) > > list = [1,2,3] > list.append ( [4,5,6] ) > x = list > x   -> >     [1,2,3,[4,5,6]] > as expected. > > But t

Re: Why did Quora choose Python for its development?

2011-05-26 Thread Ben Finney
t the right time, and the rest do not | `\ happen at all. The conscientious historian will correct these | _o__) defects.” —Mark Twain, _A Horse's Tale_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's super() considered super!

2011-05-26 Thread Ben Finney
tchie, _The C programming language_, | _o__) 1988 | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: The worth of comments

2011-05-26 Thread Ben Finney
ing the explanation. -- \“If this is your first visit to the USSR, you are welcome to | `\ it.” —hotel room, Moscow | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's super() considered super!

2011-05-27 Thread Ben Finney
“If you continue running Windows, your system may become | `\unstable.” —Microsoft, Windows 95 bluescreen error message | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner needs advice

2011-05-28 Thread Uncle Ben
On May 27, 5:33 pm, Ethan Furman wrote: > Lew Schwartz wrote: > > So, if I read between the lines correctly, you recommend Python 3? Does > > the windows version install with a development environment? > > Dabo, last I checked, uses wxPython, which uses wxWidgets (sp?), which > is not yet ported t

Re: The worth of comments

2011-05-28 Thread Ben Finney
ent.” —Robert Benchley | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Weird problem matching with REs

2011-05-29 Thread Ben Finney
myself to the wrong which I condemn.” —Henry Thoreau, _Civil | _o__)Disobedience_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Weird problem matching with REs

2011-05-29 Thread Ben Finney
Ben Finney writes: > the two-character “CR LF” sequence (U+000C U+000A) > http://en.wikipedia.org/wiki/Newline> As detailed in that Wikipedia article, the characters are of course U+000D U+000A. -- \ “You say “Carmina”, and I say “Burana”, You say “Fortuna”, and | `\

Re: scope of function parameters

2011-05-29 Thread Ben Finney
for other non-name references like list indices etc. -- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but where are we going to find a duck and a hose at this | _o__) hour?” —_Pinky and The Brain_ | Ben Finney -- http:/

Re: scope of function parameters

2011-05-29 Thread Ben Finney
nt/93903/I_m_OK_The_Bull_Is_Dead> -- \ Moriarty: “Forty thousand million billion dollars? That money | `\must be worth a fortune!” —The Goon Show, _The Sale of | _o__) Manhattan_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters

2011-05-29 Thread Ben Finney
valuable thing we have. Let us economize | `\ it.” —Mark Twain, _Following the Equator_ | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters

2011-05-30 Thread Ben Finney
#x27;t ‘5.__add__(6)’, without the space, work? -- \“Telling pious lies to trusting children is a form of abuse, | `\plain and simple.” —Daniel Dennett, 2010-01-12 | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-30 Thread Ben Finney
means something other than what they might expect. -- \ “In case you haven't noticed, [the USA] are now almost as | `\ feared and hated all over the world as the Nazis were.” —Kurt | _o__) Vonnegut, 2004 | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner needs advice

2011-05-30 Thread Ben Finney
a Lily Tomlin, 1985 | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Updated blog post on how to use super()

2011-05-31 Thread Ben Finney
Lily Tomlin | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: float("nan") in set or as key

2011-05-31 Thread Ben Finney
, it's a good idea to stick to that specification when claiming to implement that functionality in a type. -- \ “The man who is denied the opportunity of taking decisions of | `\ importance begins to regard as important the decisions he is | _o__)allowed

Unshelving the data?

2011-06-01 Thread Uncle Ben
ere a more elegant way? Or should I to go the full database route? It is not a lage application. Ben -- http://mail.python.org/mailman/listinfo/python-list

Re: Unshelving the data?

2011-06-01 Thread Ben Finney
Uncle Ben writes: > Or should I to go the full database route? It is not a lage > application. I would recommend you at least investigate the use of SQLite for your application. It is part of the standard library since Python 2.5 http://docs.python.org/library/sqlite

Re: meaning of [ ]

2017-09-04 Thread Ben Bacarisse
[p for p in sys.path]. > Anyway this is a good example to distinguish > > [p for p in sys.path] > from > {p for p in sys.path} > > Both work in python > But the second is probably not correct because path-searching is order > dependent Right. So i'm puzzled why y

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-04 Thread Ben Bacarisse
len(n) == 0: return [] else: rest = n.copy() e = rest.pop() return [set([e]) | l for l in css(rest, r-1)] + css(rest, r) -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-05 Thread Ben Bacarisse
Rustom Mody writes: > On Tuesday, September 5, 2017 at 1:44:24 AM UTC+5:30, Ben Bacarisse wrote: >> Rustom Mody writes: >> >> > Here is some code I (tried) to write in class the other day >> > >> > The basic problem is of generating combinations >

Re: How do I find what kind of exception is thrown.

2017-09-05 Thread Ben Finney
“An idea isn't responsible for the people who believe in it.” | `\ —Donald Robert Perry Marquis | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-05 Thread Ben Finney
s, everything will remain the same.” —Barne's | `\ Law | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-06 Thread Ben Bacarisse
used a set but that's just stylistic. Converting the list-of-list version to a set of (frozen) sets is about twice as fast. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-06 Thread Ben Bacarisse
just want def cs(n, r): return frozenset({frozenset(s) for s in c(n, r)}) as suggested. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-07 Thread Ben Bacarisse
gh arbitrary rules are also possible, they will rarely be simple. (On average a rule will need at least as many symbols to be described as the puzzle itself[1].) The trouble with this puzzle is that has at least two answers that are simple rules and, to my mind, neither has a pleasing "ah!" associated with it. [1] Obviously this is not formal but it could be made so by reference to algorithmic complexity. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why do we nned both - __init__() and __new__()

2017-09-07 Thread Ben Finney
| `\ devices tell us about the actual nature of reality.” —Ann | _o__) Druyan, _Cosmos_, 2014 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Design: method in class or general function?

2017-09-07 Thread Ben Finney
orrect whatever is keeping them from moving to the actively-developed language. -- \ “Dvorak users of the world flgkd!” —Kirsten Chevalier, | `\rec.humor.oracle.d | _o__)

Re: Design: method in class or general function?

2017-09-07 Thread Ben Finney
it is best to avoid the dead-end Python 2 altogether and use the current version of Python 3. -- \ “My interest is in the future, as I am going to spend the rest | `\ of my life there.” —Charles F. Kettering | _o__)

Re: class inheritance when not defined

2017-09-08 Thread Ben Finney
ral “parent” to refer to that relationship.) -- \“We cannot solve our problems with the same thinking we used | `\ when we created them.” —Albert Einstein | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: A question on modification of a list via a function invocation

2017-09-08 Thread Ben Bacarisse
y-value semantics need not copy large objects when passing them to a function. The program must behave *as if* there is a copy but there need not actually be one. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Using Python 2

2017-09-08 Thread Ben Finney
people laugh.” —George Bernard Shaw | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: class inheritance when not defined

2017-09-08 Thread Ben Finney
thing else | `\ is opinion.” —Democritus | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Key Error: "city"

2017-09-08 Thread Ben Finney
ve a keyword argument for each name you want to refer to in the format string. -- \ “There's a certain part of the contented majority who love | `\ anybody who is worth a billion dollars.” —John Kenneth | _o__)Galbraith, 1992-05-23 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-09 Thread Ben Finney
can categorically say the Python Secret Underground does not exist. -- \ “Pinky, are you pondering what I'm pondering?” “Well, I think | `\ so, Brain, but first you'd have to take that whole bridge | _o__) apart, wouldn't you?” —_Pinky and T

Re: Python dress

2017-09-12 Thread Ben Finney
consider it. The dress looks good! -- \ “Contentment is a pearl of great price, and whosoever procures | `\it at the expense of ten thousand desires makes a wise and | _o__) happy purchase.” —J. Balguy | Ben Finney -- https://mail.python.org/

Re: "tkinter"

2017-09-13 Thread Ben Finney
der to justify in human speech. So, that basis doesn't convince me of a useful pronunciation. -- \“[R]ightful liberty is unobstructed action, according to our | `\will, within limits drawn around us by the equal rights of | _o__) others.” —T

Re: tictactoe script - commented - may have pedagogical value

2017-09-13 Thread Ben Bacarisse
know this is an old thread now, but Real Life got in the way of programming as it so annoyingly does sometimes.) -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: the core values of the Python "platform"

2017-09-13 Thread Ben Finney
, then we would still be sitting | _o__) in caves sucking our feet.” —Gene Kan, creator of Gnutella | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-13 Thread Ben Finney
thought of Western civilization) | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: the core values of the Python "platform"

2017-09-13 Thread Ben Finney
t the Zen of Python means what you say it means :-) -- \“I spent a lot of money on wine and women, and like a fool I | `\ squandered the rest.” —Benny Hill | _o__) | Ben Finney -- https://mail

Re: "tkinter"

2017-09-14 Thread Ben Finney
ar communication. That's IMO support for “tee kay inter” pronunciation of “Tkinter”. -- \ “Remember: every member of your ‘target audience’ also owns a | `\ broadcasting station. These ‘targets’ can shoot back.” —Michael | _o__) Rathbun to advertisers, news.admin.ne

Re: "tkinter"

2017-09-14 Thread Ben Finney
Steven D'Aprano writes: > On Thu, 14 Sep 2017 17:01:30 +1000, Ben Finney wrote: > > > [“Tkinter” is] not an English word. Yet we are still called upon to > > pronounce it. > > This is the first time I've heard an English language jargon word > described a

Re: Change project licence?

2017-09-14 Thread Ben Finney
urd is able to make you | `\unjust.” —Voltaire | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Old Man Yells At Cloud

2017-09-18 Thread Ben Bacarisse
mon implementations. To get a more fruitful exchange of views, a division like 1/3 or 1/10 might be a better example. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Old Man Yells At Cloud

2017-09-18 Thread Ben Bacarisse
tion I expected! Teaching rings and fields is (or at least was 30 or so years ago) 1st year undergraduate maths here in the UK. Maybe it's changed. BTW, I don't think this has anything to do with what 1/3 should be in Python. Python as no interest in rings and fields -- it's purely a pragmatic decision. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Old Man Yells At Cloud

2017-09-18 Thread Ben Bacarisse
n that was repeatedly asked was whether a universal print function could be written in this or that language. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Old Man Yells At Cloud

2017-09-20 Thread Ben Bacarisse
bartc writes: > Value-Added-Tax in the UK increased from 17.5% to 20%, ... When it was 17.5% you could shock people not in the know by working it out in your head since it's much simpler than it sounds: take a tenth, halve it, halve it again, and add all three. -- Ben. -

Re: Even Older Man Yells At Whippersnappers

2017-09-20 Thread Ben Bacarisse
't believe you. Dull knife, was it? Luxury! We had to dab at card wi' tongue 'till it were wet enough to punch with a whittled stick. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: How does CPython build it's NEWS or changelog?

2017-09-21 Thread Ben Finney
tial Mystery that attends any journey is: how did the | `\ traveller reach his starting point in the first place?” —Louise | _o__) Bogan, _Journey Around My Room_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Printing a Chunk Of Words

2017-09-25 Thread Ben Bacarisse
27;Not ',D('=',' is ',D('!','Not ',""" Boolean Operators 1&1=1 1&0=0 0&1=0 0&0=0 1|1=1 1|0=1 0|1=1 0|0=0 !1=0 !0=1""" And applying the same idea twice I can get 255: def D(x,y,s):return s.replace(x,y) print(eval(D('"D','D("',D(',','","','''"D-,--,D1,True,D0,False,D&, and ,D|, or ,D!,Not ,D=, is ,D!,Not ,"" Boolean Operators 1&1=1 1&0=0 0&1=0 0&0=0 1|1=1 1|0=1 0|1=1 0|0=0 !1=0 !0=1"""''' -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Change project licence?

2017-09-26 Thread Ben Finney
all. You can continue with that license grant indefinitely. -- \ “One time I went to a drive-in in a cab. The movie cost me | `\ ninety-five dollars.” —Steven Wright | _o__) | Ben Fin

Re: Grumpy-pants spoil-sport

2017-09-26 Thread Ben Finney
discuss how both misapprehensions are wrong. -- \ “[H]ow deep can a truth be — indeed, how true can it be — if it | `\ is not built from facts?” —Kathryn Schulz, 2015-10-19 | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Parentheses (as after "print")

2017-09-26 Thread Ben Finney
erday, stand up today.” —_The Anatomy of | `\ Frustration_, H. G. Wells, 1936 | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Parentheses (as after "print")

2017-09-26 Thread Ben Finney
drive downtown and get a | `\ great parking spot, then sit in my car and count how many | _o__)people ask me if I'm leaving.” —Steven Wright | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: None is None but not working

2017-09-27 Thread Ben Finney
you know.” —Sassan Tat | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: on a very slow function

2017-10-01 Thread Ben Bacarisse
gt; return sequence > > It crawls pretty soon. Please advise? A mathematical rather than Python answer... change it to last = (last**2 + c) % N return next -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: on a very slow function

2017-10-01 Thread Ben Bacarisse
Steve D'Aprano writes: > On Mon, 2 Oct 2017 09:49 am, Ben Bacarisse wrote: > >> Daniel Bastos writes: >> >>> def make_sequence_non_recursive(N, x0 = 2, c = -1): >>> "What's wrong with this function? It's very slow." >>>

Re: on a very slow function

2017-10-02 Thread Ben Bacarisse
Steve D'Aprano writes: > On Mon, 2 Oct 2017 12:00 pm, Ben Bacarisse wrote: > > >>> Better: >>> >>> last = (pow(last, 2, N) + (2 % N)) % N >> >> You meant c rather than 2, I think. > > Oops, yes, that was a typo. > > >>

Re: Need some help with argparse

2017-10-03 Thread Ben Finney
y_group[group_name] } for group_name in argument_names_by_group } -- \ “I believe our future depends powerfully on how well we | `\ understand this cosmos, in which we float like a mote of dust | _o__) in the morning sky.” —Carl Sagan, _Cosmos_, 1980 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-04 Thread Ben Bacarisse
hat don't exit the loop ... while condition begin ... more statements that don't exit the loop ... ... statements that don't exit the loop ... end -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Good virtualenv and packaging tutorials for beginner?

2017-10-04 Thread Ben Finney
ear.” —Ambrose Redmoon | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-04 Thread Ben Bacarisse
-loop as an abbreviation for that. That sounds very complicated, but I think I favour the other extreme to you. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-04 Thread Ben Bacarisse
ode, I would certainly not indent my text commentary. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Easier way to do this?

2017-10-04 Thread Ben Bacarisse
> and repeat if statements for the rest of 25+ employees. Eek! When you have named objects selected using a string that is the object's name you know you want a dict. You'd have a single dict for all employees, keyed by the tag in field 18 of the file. Does that help? I'm del

Re: How to determine lowest version of Python 3 to run?

2017-10-04 Thread Ben Finney
nd why | `\ is, quite literally, what a very large part of our brain has | _o__) evolved to do.” —Douglas Adams | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Pedagogical style [was Re: The "loop and a half"]

2017-10-05 Thread Ben Bacarisse
e to be cautious before accepting the research as > fact. I think the paper is this one: http://faculty.psy.ohio-state.edu/sloutsky/pdf/KSH-published.pdf (You can find more recent papers by searching the Ohio State University site.) >From what I've read, your anecdotes are not in c

Re: The "loop and a half"

2017-10-05 Thread Ben Bacarisse
me across a few too many programs lately clearly written by people who want to be helpful, but the wordy output is hard to parse when using the program in a script. Some programs offer a flag to simplify the output so it can be processed more easily, but not all... > But the OS is what it is, and the culture has a certain level of commandline > machismo, so that's unlikely to change. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Interactive scripts (back on topic for once) [was Re: The "loop and a half"]

2017-10-06 Thread Ben Bacarisse
put fileno to see if a prompt is needed. You could argue, though, that anyone who's re-arranged a program's input so that some non-zero input fileno is attached to a terminal won't need the prompt! -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Interactive scripts (back on topic for once) [was Re: The "loop and a half"]

2017-10-06 Thread Ben Bacarisse
Steve D'Aprano writes: > On Fri, 6 Oct 2017 09:33 pm, Ben Bacarisse wrote: > >> A general solution to the (rather odd) complaint about silent waiting >> should really check any input fileno to see if a prompt is needed.  You >> could argue, though, that anyone who&#x

Re: The "loop and a half"

2017-10-06 Thread Ben Bacarisse
> If gcc -E wrote its output to a file, you'd have to read that file, >> manage the process of deleting it after use (and handle possible >> deletion of it if an error occurred), etc. > > But if I use the -S option (show assembly listing) that DOES output to > a fil

Re: The "loop and a half"

2017-10-06 Thread Ben Bacarisse
in the 1970s either. No one did it then and no one does it now. What you are actually saying is that it is not acceptable that the option of unprompted input even exists. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-06 Thread Ben Bacarisse
bartc writes: > On 07/10/2017 01:14, Ben Bacarisse wrote: >> bartc writes: >> >>> On 06/10/2017 14:35, Paul Moore wrote: >>>> On 6 October 2017 at 13:56, bartc wrote: >>>>> If you don't like the word 'crude'

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
e that were (Perl almost always was) could not, by default, be used embedded -- you had to generate the whole page. What is (or are) the Python way (or ways) to do it? -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 7:42 AM, Ben Bacarisse wrote: >> Bill writes: >> >>> Mikhail V wrote: >>>>>>> [...] I'm not here to "cast stones", I like Python. I just think >>>>>>> that you

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
ferent type. I think you mean that a human writing C (rather than bartc's code generator) would probably design the code to use tokenrec ** then I agree, but the latter is not just a different way to write the former. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Ben Bacarisse writes: >>That's a different type. I think you mean that a human writing C >>(rather than bartc's code generator) would probably design the code to >>use tokenrec ** then I agree, but the latter is not

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 9:44 AM, Ben Bacarisse wrote: >> Chris Angelico writes: >>> Check out Django and Flask, the two most popular ways. I quite like >>> Flask. >> >> I see. Both appear to be frameworks (I'd heard of Djang

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 11:55 AM, Ben Bacarisse wrote: >> Chris Angelico writes: >>> it binds your URLs to >>> the concrete file system. That may not seem like too much of a >>> problem, but it's a pretty big limita

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
the same between C and C++. Even two > different C compilers could return different values. The size of (in the sense of sizeof) an expression of type char is defined to be 1. All conforming C and C++ compilers must return 1 in such a case. The difference being highlighted here is that, in C, 'a' is an integer expression. In C++ it's of type char. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse wrote: >> Chris Angelico writes: >> >>> On Thu, Oct 12, 2017 at 11:55 AM, Ben Bacarisse >>> wrote: >>>> Chris Angelico writes: >>>>> it binds your URLs to >

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Ben Bacarisse
Gregory Ewing writes: > Ben Bacarisse wrote: >> That's a different type. I think you mean that a human writing C >> (rather than bartc's code generator) would probably design the code to >> use tokenrec ** then I agree, but the latter is not just a different way

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 7:32 PM, Thomas Jollans wrote: >> On 2017-10-12 07:31, Chris Angelico wrote: >>> On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse >>> wrote: >>>> Provided some early part of the URL is handled by PHP, the r

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Ben Bacarisse
Jon Ribbens writes: > On 2017-10-12, Ben Bacarisse wrote: >> Chris Angelico writes: >>> Normally, with a Python-based framework, you don't need _any_ web >>> server configuration. You simply define your URL routing within the >>> Python code. The o

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Ben Bacarisse
Thomas Jollans writes: > On 2017-10-12 15:16, Ben Bacarisse wrote: >> Gregory Ewing writes: >> >>> Ben Bacarisse wrote: >>>> That's a different type. I think you mean that a human writing C >>>> (rather than bartc's code generator) wou

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Ben Bacarisse
Jon Ribbens writes: > On 2017-10-12, Ben Bacarisse wrote: >> I see. If I'm reading this right, the app requests are passed through >> to another server -- uWSGI. > > Yes. It doesn't have to be uWSGI; it could be gunicorn, or you could > probably use Apache

Re: Heroku (was Re: Lies in education [was Re: The "loop and a half"])

2017-10-12 Thread Ben Bacarisse
Chris Angelico writes: > On Fri, Oct 13, 2017 at 1:09 AM, Ben Bacarisse wrote: >> Chris Angelico writes: >> >>> On Thu, Oct 12, 2017 at 7:32 PM, Thomas Jollans wrote: >>>> On 2017-10-12 07:31, Chris Angelico wrote: >>>>> On Thu, Oc

Re: Heroku (was Re: Lies in education [was Re: The "loop and a half"])

2017-10-13 Thread Ben Bacarisse
Chris Angelico writes: > On Fri, Oct 13, 2017 at 10:14 AM, Ben Bacarisse wrote: >> Chris Angelico writes: >>> I abbreviated that down to nothing, but since you ask, here's a really >>> REALLY simple run-down of how to use Heroku: >> >> I

Re: Heroku (was Re: Lies in education [was Re: The "loop and a half"])

2017-10-13 Thread Ben Bacarisse
Chris Angelico writes: > On Sat, Oct 14, 2017 at 8:42 AM, Ben Bacarisse wrote: >> Chris Angelico writes: >> >>> On Fri, Oct 13, 2017 at 10:14 AM, Ben Bacarisse >>> wrote: >>>> Chris Angelico writes: >>>>> I abbreviated that down

Re: Heroku (was Re: Lies in education [was Re: The "loop and a half"])

2017-10-14 Thread Ben Bacarisse
"Peter J. Holzer" writes: > On 2017-10-13 21:42, Ben Bacarisse wrote: >> That's one way to put it. Another is that to use Python I need to buy a >> new service that is already configured. > > That's exactly the same for PHP. You can't use that ei

Re: Python 2 -> 3, urllib.urlopen (corrected the case)

2017-10-14 Thread Ben Bacarisse
7;http://finance.yahoo.com/d/quotes.csv?s=aapl&f=l1' 156.99 Finally, wget -S shows that the resource has moved. It is now at Location: http://download.finance.yahoo.com/d/quotes.csv?s=aapl&f=l1 I don't think this has anything to do with your problem, but it's worth noting. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 -> 3, urllib.urlopen (corrected the case)

2017-10-14 Thread Ben Bacarisse
eresting. > Apparently, Python 3 differs from Python 2 in the way that it is > handling a missing/forwarding URL, because the original code in Python > 2.7 works perfectly. Python 3 works for me. I still suspect it's some system difference rather than being, say, a 3.6.1 vs 3.5.2 difference. What happens if you change the URL to use https rather than http? -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 -> 3, urllib.urlopen (corrected the case)

2017-10-15 Thread Ben Bacarisse
Irv Kalb writes: >> On Oct 14, 2017, at 6:46 PM, Ben Bacarisse wrote: >>>> Finally, wget -S shows that the resource has moved. It is now at >>>> >>>> Location: http://download.finance.yahoo.com/d/quotes.csv?s=aapl&f=l1 >>>> >>

Re: Can't find latest version of 3.4.x on download page

2017-10-18 Thread Ben Finney
al sanction, most or all of our religious | `\ beliefs and rituals would fall into the domain of mental | _o__) disturbance.” —John F. Schumaker | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

Re: Compression of random binary data

2017-10-23 Thread Ben Bacarisse
ossible. Of course it is. I have half a dozen programs on this machine that do it. I don't need yours. It's possible you want to claim something beyond what you stated, but no one is going to get excited until you actually claim such a thing. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

Re: Compression of random binary data

2017-10-24 Thread Ben Bacarisse
ost the link to the journal article when you are done. -- Ben. -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >