Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-20 Thread Brendan Barnwell
o ordinary expressions. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mai

Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-20 Thread Brendan Barnwell
ime rather than being a constant, but again, the point of f-strings is to make things like that writable as strings in source code. If you don't want to write them as strings, you can still concatenate separate string values or use various other solutions. -- Brendan Barnwell "Do not follow

Re: [Python-ideas] discontinue iterable strings

2016-08-20 Thread Brendan Barnwell
r a string and their code goes awry. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@python.org https://mail.

Re: [Python-ideas] Extending expressions using ellipsis

2016-09-01 Thread Brendan Barnwell
ut I'm interested to see where this thread goes. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@python.org https:/

Re: [Python-ideas] async objects

2016-10-06 Thread Brendan Barnwell
to deprecate generator-send in the distant future. On the flip side, I would hate to see decisions made that result in lots of Python code that "bakes in" specific runtime model assumptions, making it more difficult to leave those assumptions behind in the future. -- Brendan Barnwell &quo

Re: [Python-ideas] real numbers with SI scale factors

2016-08-29 Thread Brendan Barnwell
My position (reiterated by the text you quote from Steven D'Aprano) is not that Python is used only by generalists. It is that we shouldn't change Python in a way that ONLY helps specialists. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no

Re: [Python-ideas] real numbers with SI scale factors

2016-08-28 Thread Brendan Barnwell
de rigeur in the physical science community isn't enough. I would want to see some actual attempt to quantify how much benefit there would be in the PYTHON community (which of course includes, but is not limited to, those using Python for physical-science computations). -- Brendan Barnwe

Re: [Python-ideas] real numbers with SI scale factors

2016-08-28 Thread Brendan Barnwell
ame reason. Those notations are not useful enough to justify their existence. Hexadecimal is more justifiable as it is far more widely used, but I would be more open to removing hexadecimal than I would be to adding octal. Also, "L" as a long-integer suffix is already gone in P

Re: [Python-ideas] Generator-based context managers can't skip __exit__

2016-11-06 Thread Brendan Barnwell
a finally where the yield is in the try. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@python

Re: [Python-ideas] Deterministic iterator cleanup

2016-10-19 Thread Brendan Barnwell
hat header columns are present, or skip some number of rows), and then resumes. This would increase the burden of updating code to adapt to the new breakage (since in this case the programmer would likely have to, or at least want to, think about what is going on rather than just blindly wrapping e

Re: [Python-ideas] Fwd: Fwd: Fwd: unpacking generalisations for list comprehension

2016-10-18 Thread Brendan Barnwell
e kinds of things" I mean doing them more in a more conise way without an extra level of iteration. (You can "do multiplication" by adding repeatedly, but it's still nice to have multiplication as an operation.) -- Brendan Barnwell "Do not follow where the path may lea

Re: [Python-ideas] Fwd: Fwd: Fwd: unpacking generalisations for list comprehension

2016-10-17 Thread Brendan Barnwell
xists. I'm not sure whether I'm in favor of this particular syntax, but I'd like to be able to do the kind of things it allows. But doing them inherently requires breaking the invariant you describe. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where the

Re: [Python-ideas] Reduce/fold and scan with generator expressions and comprehensions

2016-10-25 Thread Brendan Barnwell
what we wanted was to able to use recurrence relations, your proposal would be insufficient. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Py

Re: [Python-ideas] Reverse assignment operators (=+, =-, =*, =/, =//, =**, =%)

2016-11-12 Thread Brendan Barnwell
rent assignment > operators. The thing is that a =+ 5 is already valid syntax, and means the same as a = +5. You don't need spaces around operators in Python. So your proposal would have the change the behavior of existing syntax, which pretty much makes it a nonstarter. -- Brendan

Re: [Python-ideas] Proposal for default character representation

2016-10-15 Thread Brendan Barnwell
provide here the works currently so don't ask me for that. Some of them would be probably available in near future. It's pretty clear to me by this point that your argument has no rational basis, so I'm regarding this thread as a dead end. -- Brendan Barnwell "Do not follow where the pat

Re: [Python-ideas] Proposal for default character representation

2016-10-12 Thread Brendan Barnwell
up with the Unicode consortium. (Good luck with that.) -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@pyth

Re: [Python-ideas] (no subject)

2016-11-29 Thread Brendan Barnwell
d messages. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listin

Re: [Python-ideas] incremental hashing in __hash__

2016-12-31 Thread Brendan Barnwell
as what he said. The point is that if they *are* the same object, you *don't* need to check equality. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Py

Re: [Python-ideas] Additions to collections.Counter and a Counter derived class

2017-03-15 Thread Brendan Barnwell
what matters is not the frequency rank but the magnitude of the separation in frequency between the outliers and the nonoutliers. But that's a much subtler notion than just "least common". -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where ther

Re: [Python-ideas] Towards harmony with JavaScript?

2017-08-11 Thread Brendan Barnwell
Python without looking up how to write comments" as a useful goal. As with .join(), once you learn that Python uses #, you know it, and it's not really a problem. Also, as someone else mentioned, // is a valid operator in Python, making its use as a comment marker potentially ambiguous. -- Br

Re: [Python-ideas] + operator on generators

2017-06-28 Thread Brendan Barnwell
tring into a nicely manipulable Path object that allows various handy path operations. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas

Re: [Python-ideas] Arguments to exceptions

2017-07-04 Thread Brendan Barnwell
e that may or may not outweigh the performance hit. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@python.org htt

Re: [Python-ideas] + operator on generators

2017-06-27 Thread Brendan Barnwell
e leftmost operand would be enough to give you nice syntax for chaining all the rest. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-idea

Re: [Python-ideas] + operator on generators

2017-06-27 Thread Brendan Barnwell
. But I don't see why it couldn't take multiple arguments as you suggest. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing li

Re: [Python-ideas] Arguments to exceptions

2017-07-05 Thread Brendan Barnwell
tion message at all by default (since the object might have a long __str__ that would be irritating). It would just be there, attached to the exception, so that it could be used if needed. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and

Re: [Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

2017-05-14 Thread Brendan Barnwell
On 2017-05-14 00:34, Chris Angelico wrote: On Sun, May 14, 2017 at 2:53 PM, Brendan Barnwell <brenb...@brenbarn.net> wrote: Attributes aren't just for passing things to other methods. They're for storing state. In your proposed system, how would an object mutate one of i

Re: [Python-ideas] JavaScript-Style Object Creation in Python (using a constructor function instead of a class to create objects)

2017-05-13 Thread Brendan Barnwell
st nothing about JavaScript's design that couldn't be done better, and most of what it does are things that Python already does better and has done better for years. In short, I don't see any advantages at all to doing classes this way, and there are some non-negligible disadvantages. -- Brendan Barnwe

Re: [Python-ideas] Augmented assignment syntax for objects.

2017-05-02 Thread Brendan Barnwell
tion arguments to assign to local names. But if you could start putting other things as function arguments, you could use them to assign to things that are not local names. That is a major change. -- Brendan Barnwell "Do not follow where the pat

Re: [Python-ideas] Membership of infinite iterators

2017-10-18 Thread Brendan Barnwell
ese infinite iterators were fixed so they could be interrupted, this containment problem would be much less painful. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown

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

2017-11-29 Thread Brendan Barnwell
to a stable base (some kind of collection) that can be re-iterated; sometimes it isn't. But that doesn't change the iteration protocol. The interpreter is not free to do what it likes behind the scenes; an implementation that did not call __iter__ in the above case would be errroneous. __iter

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

2017-11-29 Thread Brendan Barnwell
e something that isn't affected (i.e., a re-iterable). It does seem that in some cases you may want the iterator to be exhausted, and in others not, but I don't think it's a good idea to try to "hide" the unpacking by limiting the number of iterations. The important difference is between any

Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-12 Thread Brendan Barnwell
documentation. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailma

Re: [Python-ideas] Composition over Inheritance

2017-10-28 Thread Brendan Barnwell
some task. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listin

Re: [Python-ideas] Composition over Inheritance

2017-10-29 Thread Brendan Barnwell
)`. Or you can just give c an attribute that's a dict, but has an easier-to-type name than __dict__, so you can do `c.mydict[T]`. What is the specific advantage of `c.[T]` over these existing solutions? -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no

Re: [Python-ideas] Defining an easily installable "Recommended baseline package set"

2017-10-29 Thread Brendan Barnwell
will fix it if it breaks" (which is how the existing stdlib works) to "we approve these *people* (the people working on requests or regex or whatever) and we will cease to do if they break their code". -- Brendan Barnwell "Do not follow where the

Re: [Python-ideas] Why CPython is still behind in performance for some widely used patterns ?

2018-01-30 Thread Brendan Barnwell
better to make Python faster instead! :-) But I think it's an important corollary to the above. Python's excellence in developer-time "speed" is a sort of latent force multiplier that makes execution-time improvements all the more powerful. -- Brendan Barnwell "Do not follow whe

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

2018-02-28 Thread Brendan Barnwell
quot;as" syntax, I think the ONLY way to assign to an SLNB should be with the "as" syntax. You shouldn't be able to assign to an SLNB with regular assignment syntax, even if you created an SNLB with the same name as the LHS within the RHS. -- Brendan Barnwell "Do not follow

Re: [Python-ideas] Disallow importing the same module under multiple names

2018-03-14 Thread Brendan Barnwell
ugins available on the default import path. For what it's worth, I have been bitten by the problem a few times, although it's not very common. I think it's worth considering the proposal, but not sure if any change is justified given that the issue is fairly obscure. -- Brendan Barnwell &qu

Re: [Python-ideas] PEP 572: Assignment Expressions (post #4)

2018-04-11 Thread Brendan Barnwell
st don't see how this proposal provides any way to make things like the quadratic formula example above MORE readable. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown

Re: [Python-ideas] PEP 572: Assignment Expressions (post #4)

2018-04-11 Thread Brendan Barnwell
= (-b + sqrt(D)))/2, (-b - sqrt(D))/2 If the new feature encourages people to do something like your example (or my earlier examples with the D definition inline in the expression for x1), then I'd consider that another mark against it. -- Brendan Barnwell "Do not follow where the path may

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

2018-04-10 Thread Brendan Barnwell
nk of code is being documented. If the documentation for accumulate doesn't give the information that people using it need to know, that's a documentation bug for sure, but it doesn't mean we should stop using functions. -- Brendan Barnwell "Do not follow where the path may lead. Go,

Re: [Python-ideas] Spelling of Assignment Expressions PEP 572 (was post #4)

2018-04-15 Thread Brendan Barnwell
putting the expression first has some advantages, but they just don't seem as important to me as they apparently do to you. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown _

Re: [Python-ideas] Dart like multi line strings identation

2018-04-01 Thread Brendan Barnwell
that many of the combinations you list differ only in case, which to my mind adds no extra cognitive load whatsoever.) -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___

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

2018-03-02 Thread Brendan Barnwell
occur makes the overall construct LESS readable for me, not more, so I'm -1 on the current proposal. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown _

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

2018-03-02 Thread Brendan Barnwell
omething, None):". But you could have "while (do_something() as x) is not _sentinel". Not sure how proponents and opponents would react to that. Limiting the SLNB to the beginning of block-level statements seems perverse in a way, but also might cut down on gratuitous overuse mixed

Re: [Python-ideas] A comprehension scope issue in PEP 572

2018-05-10 Thread Brendan Barnwell
al sense IN ADDITION TO having practical utility, and fit together into a unified whole. Personally my feeling on this whole thread is that these changes, if implemented are likely to decrease the average readability of Python code, and I don't see the benefits as being worth the added complexity.

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

2018-05-13 Thread Brendan Barnwell
dia.org/wiki/Compound_interest#Mathematics_of_interest_rate_on_loans). If we have to use the word "given" even though the word mathematicians would use in that position is "where", that's not such a big deal. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where ther

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

2018-05-13 Thread Brendan Barnwell
explode due to the attractiveness of the reserved words. That is, many libraries would start defining things named "and", "or", "with", "is", "in", etc., because the names are so nice and short and are useful in so many situations. So there'd be

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

2018-05-13 Thread Brendan Barnwell
, that's not sufficient. Part of what I'm saying is that on LATER readings it's faster to see the overall expression first, because you don't have to plow through the definitions of the givens. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where ther

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

2018-05-11 Thread Brendan Barnwell
ent components. If we just have "Eddie McEquals, president of the International Association of Assignment Expression advocates, delivered a speech yesterday at the organization's convention", the inline appositive is not so disruptive. But the more complex the inline definitions become

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

2018-05-11 Thread Brendan Barnwell
On 2018-05-11 11:08, Brendan Barnwell wrote: . . . and it's true the latter is a bit more verbose in that case for little extra benefit. But when the locally-defined value is used within a more complicated expression (like the quadratic formula example), I think readability goes down

Re: [Python-ideas] A comprehension scope issue in PEP 572

2018-05-07 Thread Brendan Barnwell
and returns the missing value, so be it. That's not a big deal. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@

Re: [Python-ideas] __dir__ in which folder is this py file

2018-05-07 Thread Brendan Barnwell
ence for claims about whether things "really are" distracting, readable, unreadable, intuitive, etc. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown

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

2018-05-18 Thread Brendan Barnwell
nitely pushes me even more towards disliking the assignment-expression proposals and preferring a more specific change to the syntax of particular constructs (if, while, maybe comprehensions) --- or no change at all. -- Brendan Barnwell "Do not follow where the path may lead. Go,

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

2018-05-19 Thread Brendan Barnwell
. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-

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

2018-05-21 Thread Brendan Barnwell
s: what are the languages that people specifically believe are superior to other languages *in design*? (Even better would be what are the languages that actually ARE superior, in some reasonably nonsubjective, definable, way, but we have even less data on that.) -- Brendan Barnwell "Do

Re: [Python-ideas] Keyword for direct pass through of kwargs to super

2018-05-27 Thread Brendan Barnwell
in the past, though.) But I don't really see how your solution of magically making kwargs appear and disappear is a good solution to that problem. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a tr