Re: [Python-ideas] Python dependancies

2017-01-16 Thread Rhodri James
with CONTROL-C -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] a bad feature in Python syntax

2017-03-01 Thread Rhodri James
against False (or True) is bad idea. I would certainly reject any code doing it that came past me for review. Use "not" instead. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.pytho

Re: [Python-ideas] Way to repeat other than "for _ in range(x)"

2017-03-30 Thread Rhodri James
t) is a special case, and a pretty limited one at that. I'm not sure I've needed it, certainly not for a while, and I have to say I don't find array initialisation a compelling use-case. I really don't like the idea of finding it in comprehensions. -- Rhodri J

Re: [Python-ideas] Custom Code Folding: Standardized Rules and Syntax?

2017-07-17 Thread Rhodri James
wrote a folding editor to make programming in Occam bearable :-) -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Idea : for smarter assignment?

2017-07-21 Thread Rhodri James
of a dictionary literal. From that point on your whole argument falls apart. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf

Re: [Python-ideas] Hexadecimal floating literals

2017-09-22 Thread Rhodri James
this idea is that a lot of the initial enthusiasm on this list came from people saying exactly that. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Con

Re: [Python-ideas] How assignment should work with generators?

2017-11-28 Thread Rhodri James
ssignment would work, or even the length of A[:] as an assignment target, I'm not going to dismiss it out of hand. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-idea

Re: [Python-ideas] How assignment should work with generators?

2017-11-29 Thread Rhodri James
pam", there's a clear indication that 'spam' needs to provide exactly two values; but "A[:] = spam" could have any number of values, and it'll expand or shrink the list accordingly. Rhodri James wrote: Flatly, no. It is better not to ask for things you don't want in the first place

Re: [Python-ideas] a sorting protocol dunder method?

2017-12-04 Thread Rhodri James
ask next. When the newsletter asks me for a list of readers, though, I sort them alphabetically by surname, which most people would think of as the natural sorting order. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas

Re: [Python-ideas] Crazy idea: allow keywords as names in certain positions

2018-05-14 Thread Rhodri James
a parsing course, but can you turn that inside out? Are there times when the compiler knows it must be looking at a keyword, not a name? I suspect not, given that arbitrary expressions can be statements, but someone else may have a more knowledgeable opinion. -- Rhodri James *-* Kynesim Ltd

Re: [Python-ideas] Inline assignments using "given" clauses

2018-05-14 Thread Rhodri James
to write less clear code. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Inline assignments using "given" clauses

2018-05-14 Thread Rhodri James
that I don't like. This "while expr as name" form is not a win in my book. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://pyth

Re: [Python-ideas] Have a "j" format option for lists

2018-05-09 Thread Rhodri James
ly capable of implementing the fluffy collection of vague aspirations and inconsistent terminology they have given me, but the results won't be what they expect and probably won't be what they want either. And that's just talking to my boss :-) If you want somethi

Re: [Python-ideas] Have a "j" format option for lists

2018-05-10 Thread Rhodri James
On 09/05/18 20:56, Facundo Batista wrote: 2018-05-09 13:48 GMT-03:00 Rhodri James <rho...@kynesim.co.uk>: -1 until you give me an actual spec rather than a curious example. Sorry if that sounds a bit rude, but I spend most of my time trying to find Be sorry, it was rude. On refl

Re: [Python-ideas] Inline assignments using "given" clauses

2018-05-10 Thread Rhodri James
, the less I like them. All I really want is a less clumsy way to write while true: thing_to_do = get_something_to_do() if thing_to_do == GET_OUT_OF_HERE: break # else do stuff -- Rhodri James *-* Kynesim Ltd

Re: [Python-ideas] Inline assignments using "given" clauses

2018-05-11 Thread Rhodri James
ions. The second version using "given" reads much more naturally to the mathematician in me, and not too badly to my English half either. [*] By "like this" I mean the clunky "while true:" spelling, obviously. -- Rhodri James *-* Kynesim Ltd _

Re: [Python-ideas] Inline assignments using "given" clauses

2018-05-11 Thread Rhodri James
uot; I hear "I had to read what I was making a snap decision on." Sounds like a win :-) -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of

Re: [Python-ideas] Inline assignments using "given" clauses

2018-05-11 Thread Rhodri James
rage + decay * x smooth_signal.append(average) is quite a bit more comprehensible. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http:

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-21 Thread Rhodri James
g(v); The condition expression itself is not what I want to capture; I need a subexpression, which the "as" syntax won't give me. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mail

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-21 Thread Rhodri James
On 21/05/18 12:29, Daniel Moisset wrote: On 21 May 2018 at 12:05, Rhodri James <rho...@kynesim.co.uk> wrote: Thanks for the analysis, but I'm afraid I must disagree with your recommendation. It was the thought I first had when Chris came out with his first draft of the PEP several mont

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-21 Thread Rhodri James
ese two are somewhat different things. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-21 Thread Rhodri James
d I haven't seen a convincing example of an useful assignment expression in a comprehension that wasn't also a convincing example of things that shouldn't have been comprehensions in the first place. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mai

Re: [Python-ideas] A "within" keyword

2018-06-08 Thread Rhodri James
that, I'd just type A.cool_namespace.foo() when I wanted it. Explicit is better than implicit, after all. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Give regex operations more sugar

2018-06-13 Thread Rhodri James
portunity. That said, I don't see how having a special delimiter syntax for something that could just as well be a string is a help. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mail

Re: [Python-ideas] Yet another idea for assignment expressions

2018-05-02 Thread Rhodri James
. Sorry, it's just too magic. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Pattern Matching Syntax

2018-05-03 Thread Rhodri James
in words. It wasn't even obvious from your introduction that you were talking about match *expressions* rather than switch statements. Sorry, but this is too unclear to comment on at the moment. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list

Re: [Python-ideas] Dollar operator suggestion

2017-10-26 Thread Rhodri James
,2,3])" ? What do you do for functions with two or more arguments? The obvious thing would be to make the right-hand side of the $ operator a tuple, and whoops, there are your parentheses again. I don't think this proposal achieves your aim, and I dislike it for a lot of other reasons. -

Re: [Python-ideas] Coming up with an alternative to PEP 505's None-aware operators

2018-02-16 Thread Rhodri James
in an f-string: print(f"{?it=get_value()!r} is printed in pure ASCII as {?it!a} and in Unicode as {?it}" While these are wins, they don't read nicely at all. I still don't see what's wrong with start = calculate_start() values = range(start, start+10) which beats everything I'

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-30 Thread Rhodri James
. Once we have that down, we can move on to person.(name?) (parentheses for emphasis.) Short of actual magic, I can't see how this is going to work. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://m

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-30 Thread Rhodri James
nter differences always made sense. I rewrote that code so that it didn't take differences of NULL pointers since that was what the bug specified, but honestly it looks lumpier and less clear now. A big comment explaining what was going on would probably be better. -- Rhodri James *-* Kynesim Ltd

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-27 Thread Rhodri James
loser to another often requested feature: delayed expression evaluation (as Steve D'Aprano pointed out). So there are other, possibly better uses for the '?' symbol. It's something that needs to be carefully considered. While my immediate reaction is "yuk", your use of "?" does

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-26 Thread Rhodri James
the difference between "+" and attempting to render "+" as a function using dunder methods. I'm not keen on "?." and "?[]", but they are nothing like as bad as you are implying, and certainly not as bad as introducing a whole new concept like boxed

Re: [Python-ideas] As-do statements/anonymous blocks in python

2018-07-26 Thread Rhodri James
les give me conflicting ideas of what you mean. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-26 Thread Rhodri James
On 26/07/18 05:25, Raymond Hettinger wrote: This PEP is one step further away from Python reading like executable pseudo-code. +1000 -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org

Re: [Python-ideas] Is this PEP-able? "with" statement inside genexps / list comprehensions

2018-07-31 Thread Rhodri James
filenames in get_directory_listing(dir) if .....) -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-31 Thread Rhodri James
On 31/07/18 18:46, Steven D'Aprano wrote: n Mon, Jul 30, 2018 at 12:41:20PM -0500, Abe Dillon wrote: [Rhodri James] On 29/07/18 16:12, Abe Dillon wrote: > spam?.eggs.cheese.aardvark # why would you ever do this? If you knew that if you really have something in "spam",

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-26 Thread Rhodri James
parameter is not None else default which is a tad wordy. That example isn't too bad, but replace "parameter" with "spam.spam.spam.eggs" and DRY suddenly becomes a rather more important principle :-) -- Rhodri James *-* Kynesim Ltd ___

Re: [Python-ideas] Make "yield" inside a with statement a SyntaxError

2018-08-08 Thread Rhodri James
if you use them around a yield block. Yes, but those sorts of context managers need to be used with care in all sorts of circumstances. Fiddling with global state is always fraught. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-15 Thread Rhodri James
you and Michael are arguing to the same end. He was suggesting that it's easier to teach a concept by introducing the idea and then a name for it, rather like the way Python creates objects before binding them. -- Rhodri James *-* Kynesim Ltd

Re: [Python-ideas] Python docs: page: In what ways in None special

2018-08-15 Thread Rhodri James
On 15/08/18 00:09, Chris Barker wrote: On Tue, Aug 14, 2018 at 10:45 AM, Rhodri James wrote: On 'None is a constant': Erm. I think you've got carried away with simplifying this and gone down a blind alley. None is a literal, and like any other literal can't be rebound. no, it's

Re: [Python-ideas] Python docs: page: In what ways in None special

2018-08-14 Thread Rhodri James
r a mutable type; explaining that common gotcha here would be good. Epigraphs: If you're going to quote Sherman, you need to expand on the uniqueness of None. Not doing that just makes it look irrelevant. It's not irrelevant, it's a tigger [1] [1] Misquoting Michael Flanders from the intro

Re: [Python-ideas] Python docs page: In what ways is None special

2018-08-16 Thread Rhodri James
afterwards, was it about None? I tend to be prolix and I know it. I appreciate people who can communicate effectively in short sentences. For the most part that's what you do admirably. This one, however, is too short, and the conjunction waves a big red flag to indicate it. -- Rhodri James

Re: [Python-ideas] Python docs page: In what ways is None special

2018-08-16 Thread Rhodri James
disagree. That original text looks like it has been very carefully written to be (almost) true. What you are proposing to replace it with is less true and confusing to boot. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas

Re: [Python-ideas] Python docs page: In what ways is None special

2018-08-16 Thread Rhodri James
your's nor mine. It is for the Python docs maintainers. I will respect their decision, even if I don't agree with it. By that logic, no discussion on this list is worth having. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas

Re: [Python-ideas] File format for automatic and manual tests

2018-08-08 Thread Rhodri James
, you are going to have to persuade them that it is useful. Demanding that they do something because you like it is not persuasive. (Personally I don't use IDEs, so you proposal is exactly no use to me. I don't think it's a suitable subject for a PEP.) -- Rhodri James *-* Kynesim Ltd

Re: [Python-ideas] Make "yield" inside a with statement a SyntaxError

2018-08-08 Thread Rhodri James
breaks in loops that are reading from generators. But that wouldn't be helpful, obviously. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-20 Thread Rhodri James
optimization for locals. defacto standards are sub-optimum -- the docs say "may not" -- that seems really sketchy to me. On the contrary, it is well defined in international standards usage. "May" and "may not" indicate that behaviour is optional, so shouldn't be

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-20 Thread Rhodri James
d. > It was delightfully intuitive. One of the things Apple have always been very good at is thinking hard about user interfaces. What made the iPhone so good was that they emulated the right physical interfaces, so flipping a page when you're reading rather than pressing a button. -- Rhodri J

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-22 Thread Rhodri James
wrong. (That was a decision made a long time ago, and I'm not fool enough to think that there's any benefit in trying to change it now. I can still be a grumpy old man over it, though.) -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list

Re: [Python-ideas] A simple proposal concerning lambda

2018-08-22 Thread Rhodri James
of something because it's a slightly less confusing name to newbies is a really low priority! Jonathan isn't proposing to change the name, just to add a synonym. The obvious quote from the Zen at this point is: "There should be one-- and preferably only one --obvious way to do it."

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-22 Thread Rhodri James
meaningless. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Does jargon make learning more difficult?

2018-08-22 Thread Rhodri James
this way of doing it: def my_very_long_function_with_one_yield_point(...): # This is a generator -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of

Re: [Python-ideas] PEP 505: None-aware operators: operators ?= and ?? and OR

2018-07-20 Thread Rhodri James
though I haven't actually checked the grammar. My only doubt is how much value there is to having a sentinel other than "None". -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mai

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-20 Thread Rhodri James
On 20/07/18 01:30, Greg Ewing wrote: Rhodri James wrote: On 19/07/18 07:06, Greg Ewing wrote: There's no such tradition for the new operators being proposed. There is, actually, it's just not a long one.  C# has had null-aware operators for a while, for example. THere's a precedent, yes

Re: [Python-ideas] A better (simpler) approach to PEP 505

2018-07-23 Thread Rhodri James
k to my original comment: is this really a problem we want to solve? How are you supposed to do method calling, the equivalent of "foo?.bar()" ? "NoneAware(foo).bar.unbox()()" looks downright weird. Is there more magic in NoneAware to cover this case? (Not that I think

Re: [Python-ideas] A better (simpler) approach to PEP 505

2018-07-23 Thread Rhodri James
On 23/07/18 19:21, David Mertz wrote: On Mon, Jul 23, 2018 at 2:12 PM Rhodri James wrote: How are you supposed to do method calling, the equivalent of "foo?.bar()" ? "NoneAware(foo).bar.unbox()()" looks downright weird. Is there more magic in NoneAware to cover this case

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-19 Thread Rhodri James
If anyone can think of a good word for "if it isn't None, otherwise", I'd be all for it :-) -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-19 Thread Rhodri James
the repetition is more of an issue. It's much worse if what you have is more like: item = spam.spam.spam.eggs if spam.spam.spam.eggs is not None else beans -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-19 Thread Rhodri James
in a C-like language, though. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-24 Thread Rhodri James
On 24/07/18 14:02, David Mertz wrote: On Tue, Jul 24, 2018, 7:38 AM Rhodri James wrote: I'm still of the opinion that both approaches are trying to solve a problem that's too niche to merit them, BTW. That doesn't make sense to me. You think my little library shouldn't be allowed on PyPI? I

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-24 Thread Rhodri James
are trying to solve a problem that's too niche to merit them, BTW. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-24 Thread Rhodri James
On 24/07/18 12:56, Grégory Lielens wrote: On Tuesday, July 24, 2018 at 1:38:42 PM UTC+2, Rhodri James wrote: -snip- I'm still of the opinion that both approaches are trying to solve a problem that's too niche to merit them, BTW. That's also my impression. Hence the second approach: it does

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-24 Thread Rhodri James
disagree with you about ? not giving any much indication that it's about Nullness except for the (relatively short) history of using it to mean exactly that in C# etc. However I don't think that a class of whatever name doing something magic is any better. -- Rhodri James *-* Kynesim Ltd

Re: [Python-ideas] Keyword only argument on function call

2018-09-07 Thread Rhodri James
everywhere, such that the "declaration part" and the "use" part agree on the same idea (same type). ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python

Re: [Python-ideas] Keyword only argument on function call

2018-09-07 Thread Rhodri James
it does mean. Could you try that again? -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Keyword only argument on function call

2018-09-07 Thread Rhodri James
if part of my dislike of your proposal is that you are deliberately blurring that disconnect? -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http

Re: [Python-ideas] Keyword only argument on function call

2018-09-06 Thread Rhodri James
prefer f(page) today. For some reason. That might refute your statement or not, depending on why they do it. Evidence? -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-13 Thread Rhodri James
the use of pathlib with things that aren't filing systems, such as http or ftp. Moving the file operations into pathlib would strain that idea even harder than my (extremely superficial) current thinking. -- Rhodri James *-* Kynesim Ltd ___ Python

Re: [Python-ideas] PEP 572 version 2: Statement-Local Name Bindings

2018-03-06 Thread Rhodri James
t's a good thing). Le 2 mars 2018 20:48, "Rhodri James" <rho...@kynesim.co.uk> a écrit : On 02/03/18 18:27, Jelle Zijlstra wrote: 2018-03-02 7:03 GMT-08:00 Robert Vanden Eynde <robertv...@gmail.com>: Guys, please don't email to me *and* the mailing list. Getting two copies

Re: [Python-ideas] Descouraging the implicit string concatenation

2018-03-14 Thread Rhodri James
expect the constant string implicit concatenation to produce single constants efficiently, but explicit concatenation doing the constant folding is a much less sure bet. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python

Re: [Python-ideas] Proposal: A Reduce-Map Comprehension and a "last" builtin

2018-04-10 Thread Rhodri James
ou've used the term.) Thank you for saying that, Steven. I must admit I was beginning to find the implicit insults rather grating. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listi

Re: [Python-ideas] Proposal: A Reduce-Map Comprehension and a "last" builtin

2018-04-05 Thread Rhodri James
ecay*xt yield average signal = [math.sin(i*0.01) + random.normalvariate(0, 0.1) for i in range(1000)] smooth_signal = list(exponential_moving_average(signal, decay=0.05)) Aside from unnecessarily being a generator, this reads better to me! -

Re: [Python-ideas] Proposal: A Reduce-Map Comprehension and a "last" builtin

2018-04-09 Thread Rhodri James
tive. For me, my expectations of '!' run roughly as: * factorial (from my maths degree) * array dereference (because I am old: a!2 was the equivalent of a[2] in BCPL) * an exclamation, much overused in writing * the author was bitten by Yahoo! at an early age. -

Re: [Python-ideas] Proposal: A Reduce-Map Comprehension and a "last" builtin

2018-04-09 Thread Rhodri James
On 09/04/18 11:52, Rhodri James wrote: On 07/04/18 09:54, Cammil Taank wrote: Care to repeat those arguments? Indeed. *Minimal use of characters* Terseness is not necessarily a virtue.  While it's good not to be needlessly verbose, Python is not Perl and we are not trying to do

Re: [Python-ideas] PEP 572: Statement-Local Name Bindings, take three!

2018-03-26 Thread Rhodri James
confusion. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] In-place assignment for "boolean or"?

2018-03-26 Thread Rhodri James
of letters and symbols appealing, sorry. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-19 Thread Rhodri James
is appropriate. Your solution also isn't detailed enough, as several people have pointed out. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http

Re: [Python-ideas] PEP 572: Statement-Local Name Bindings, take three!

2018-03-23 Thread Rhodri James
proposal that ought to be mentioned here? If this proposal is rejected, it should be rejected with a full set of alternatives. Thank you very much, Chris. I think you've won me over on most points, though I'm not sure whether I'm overall +0 or -0 on the whole PEP :-) -- Rhodri James *-* Kynesim Ltd

Re: [Python-ideas] PEP 572 version 2: Statement-Local Name Bindings

2018-03-02 Thread Rhodri James
On 02/03/18 18:27, Jelle Zijlstra wrote: 2018-03-02 7:03 GMT-08:00 Robert Vanden Eynde <robertv...@gmail.com>: Guys, please don't email to me *and* the mailing list. Getting two copies of your deathless prose makes me less likely to pay attention to you, not more. -- Rhodri

Re: [Python-ideas] PEP 572 version 2: Statement-Local Name Bindings

2018-03-02 Thread Rhodri James
e arguing as to whether "a" is a special snowflake or just a normal local variable. 2. Add a "with" clause to comprehensions to make comprehension-local variables (presumably the same class of thing as the iteration variables). -- Rhodri James *-* Kynesim Ltd

Re: [Python-ideas] Allow a group by operation for dict comprehension

2018-06-28 Thread Rhodri James
and then attempting to hide the magic. Worse, you are hiding it by pretending to be something else (an ordinary comprehension), which will break people's intuition about what is being produced. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas

Re: [Python-ideas] Debugging: some problems and possible solutions

2018-10-08 Thread Rhodri James
On 04/10/18 19:10, Jonathan Fine wrote: In response to my problem-solution pair (fixing a typo) TITLE: Debug print() statements cause doctests to fail Rhodri James wrote: Or write your debug output to stderr? Perhaps I've been too concise. If so, I apologise. My proposal is that the system

Re: [Python-ideas] Return for assignment blocks

2018-10-24 Thread Rhodri James
her people are going to be surprised that you can only use it in a return statement or you have to open the whole can of worms about multi-line lambdas. Good luck on the latter. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@

Re: [Python-ideas] Allow Context Managers to Support Suspended Execution

2018-11-01 Thread Rhodri James
t of view, yielding does not leave the with block in any meaningful sense. Indeed I'd be quite hacked off with a file context manager that was so inefficient as to close the file on yielding a line, only to have to re-open and seek when it got control back. -- Rhodri James *-* K

Re: [Python-ideas] Return for assignment blocks

2018-10-25 Thread Rhodri James
think it's worth it, mind you. On Wed, Oct 24, 2018 at 2:31 PM Greg Ewing wrote: Calvin Spealman wrote: def ignore_exc(exc_type): return def (func): > ... Something very similar has been suggested before, you might like to review the previous discussion. -- Rhodri Ja

Re: [Python-ideas] Debugging: some problems and possible solutions

2018-10-04 Thread Rhodri James
. ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/ Or write your debug output to stderr? -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing

Re: [Python-ideas] "while:" for the loop

2018-10-02 Thread Rhodri James
t; need to be *mastered* a tad patronising. I have genuinely not had to take more than five minutes to get it through to an uninterested and not particularly technical 12-year old. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Debugging: some problems and possible solutions

2018-10-04 Thread Rhodri James
to get comfortable doing. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] CoC violation

2018-09-21 Thread Rhodri James
a bad path to go down. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Why is design-by-contracts not widely adopted?

2018-09-26 Thread Rhodri James
eptible to automated testing, though, not without spending twice as long writing (and testing!) the test environment as the code. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listin

Re: [Python-ideas] Moving to another forum system where

2018-09-20 Thread Rhodri James
different to resurrecting a moribund topic. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] "slur" vs "insult"?

2018-09-21 Thread Rhodri James
de or offensive remark or action" (at least in the meanings we are talking about). They have overlapping meanings but aren't identical. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.

Re: [Python-ideas] Why is design-by-contracts not widely

2018-09-25 Thread Rhodri James
the new syntax, so it does impact on them. The additional accidental complexity isn't something you can just dismiss because not everyone will have to use it. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https

Re: [Python-ideas] Retire or reword the "Beautiful is better than ugly" Zen clause

2018-09-13 Thread Rhodri James
n-ideas Code of Conduct: http://python.org/psf/codeofconduct/ ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/ -- Rhodri James *-* Kynesim Ltd

Re: [Python-ideas] New explicit methods to trim strings

2019-04-02 Thread Rhodri James
affixes, and that in providing these particular batteries we might be encouraging poor practise. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http

Re: [Python-ideas] New explicit methods to trim strings

2019-04-02 Thread Rhodri James
error-prone when you cut and paste for a different prompt elsewhere and forget to change the slice to match. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code

Re: [Python-ideas] New explicit methods to trim strings

2019-03-25 Thread Rhodri James
concatenation doesn't have a well-defined inverse, as you demonstrated by not actually trying to define it. It strikes me that following this line of reasoning is at best a category error. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing

Re: [Python-ideas] New Project to Capture summaries from this

2019-03-28 Thread Rhodri James
o populate the repo with its initial content. Having to do new work would certainly discourage some of the less technically well-founded ideas. I don't think that's what you meant, though :-) -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing l

Re: [Python-ideas] PEP 8 update on line length

2019-02-27 Thread Rhodri James
rtant, especially when you consider that PEP8 only really has force for the standard library. -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Dict joining using + and +=

2019-02-27 Thread Rhodri James
, I feel obliged to point out that this last is currently spelled dict_a.update(dict_b) -- Rhodri James *-* Kynesim Ltd ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http

  1   2   3   >