[Python-ideas] Re: Adding a Version type

2021-10-11 Thread Rob Cliffe via Python-ideas
version checking. Understood. But would you agree that if you are writing code to be Python 2- and Python 3-compatible, it is reasonable to check the major version: Python3 = sys.version_info.major >= 3     if Python3:     # this code used to work without this bit     ... if not Python3:

[Python-ideas] Except * formatting

2021-10-17 Thread Rob Cliffe via Python-ideas
I'm sending this to python-list because my emails to python-dev keep getting bounced back (after a few days delay).  I've no idea why. Instead of `except group ...`, what about `except for ...`? No new keywords. Reads naturally in English. Hints that there is more than one kind of

[Python-ideas] Re: Syntax for late-bound arguments

2021-10-24 Thread Rob Cliffe via Python-ideas
es Rob Cliffe _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@pytho

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-25 Thread Rob Cliffe via Python-ideas
My 2¢ (perhaps it should be 3¢ as I've already contributed 2¢). Chris A did ask/  "do Python core devs agree with less-skilled Python programmers on the intuitions?"/ so putting myself firmly in the second camp (though I have been using Python for over a decade) here are my t

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-25 Thread Rob Cliffe via Python-ideas
On 26/10/2021 02:12, Chris Angelico wrote: On Tue, Oct 26, 2021 at 11:44 AM Rob Cliffe via Python-ideas wrote: I prefer 1). Easier to understand and debug in examples with side-effects such as def f(a := enter_codes(), b = assign_targets(), c := unlock_missiles(), d = FIRE()): (not

[Python-ideas] Re: Unpacking in tuple/list/set/dict comprehensions

2021-10-26 Thread Irit Katriel via Python-ideas
s ability to provide friendly error messages?  (Pablo did a lot of work on error messages for 3.10, so check a current python version). I'm not saying I'm seeing an issue - just that these points need to be thought through and perhaps mentioned in the PEP. On Tuesday, October 26,

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-26 Thread Rob Cliffe via Python-ideas
On 26/10/2021 02:56, Steven D'Aprano wrote: On Tue, Oct 26, 2021 at 01:32:58AM +0100, Rob Cliffe via Python-ideas wrote: Syntax bikeshedding: I still favour     var := expr That clashes with the walrus operator. Remember that the walrus operator can appear inside the expression:

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-26 Thread Rob Cliffe via Python-ideas
On 26/10/2021 02:56, Steven D'Aprano wrote: On Tue, Oct 26, 2021 at 01:32:58AM +0100, Rob Cliffe via Python-ideas wrote: Syntax bikeshedding: I still favour     var := expr That clashes with the walrus operator. Remember that the walrus operator can appear inside the expression:

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-26 Thread Rob Cliffe via Python-ideas
I think you'll find that this sort of thing is rather surprising. And that's what we have here: changing from one form of argument default to another changes whether left-to-right applies or not. I don't want that. And based on an experiment with a less-experienced Python programmer (

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-26 Thread Rob Cliffe via Python-ideas
llows late default values to refer to subsequent early default values, e.g. in the example above `latedefault2' could refer to `c`.  So yes, then that code would be legal on some interpreters and not others, as you said.  If you understood exactly what I meant, I apologise. Rob Cliffe ___

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-26 Thread Rob Cliffe via Python-ideas
7;s for another day. ChrisA Indeed.  And it could be useful to know if a parameter was passed a value or given the default value. Python has very comprehensive introspection abilities, but this is a (small) gap. Rob Cliffe _______ Python-ideas mailing

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-26 Thread Rob Cliffe via Python-ideas
t would be the point of writing it if it didn't? Rob Cliffe -CHB -- Christopher Barker, PhD (Chris) Python Language Consulting   - Teaching   - Scientific Software Development   - Desktop GUI and Web Development   - wxPython, numpy, scipy, Cython ____

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-26 Thread Rob Cliffe via Python-ideas
On 27/10/2021 03:12, Brendan Barnwell wrote: On 2021-10-26 17:41, Christopher Barker wrote: Python used to be such a simple language, not so much anymore :-( I quite agree, and I feel like this is my biggest reason why I don't want this "feature" (or any of another gaz

[Python-ideas] Re: Syntax for late-bound arguments

2021-10-28 Thread Rob Cliffe via Python-ideas
+1 on the idea. Sometimes early binding is needed, sometimes late binding is needed.  So Python should provide both.  QED 😁 I'm not keen on the     var = > expr syntax.  IMO the arrow is pointing the wrong way.  expr is assigned to var. Some possible alternatives, if there is no t

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-30 Thread Rob Cliffe via Python-ideas
ly is. PEP 671, if accepted, will undoubtedly be USEFUL to Python programmers. As for deferred evaluation objects:     First, Python already has various ways of doing deferred evaluation:         Lambdas         Strings, which can be passed to eval / exec / compile.         You can write deco

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-31 Thread Rob Cliffe via Python-ideas
On 31/10/2021 08:05, Steven D'Aprano wrote: On Tue, Oct 26, 2021 at 08:59:51AM +0100, Rob Cliffe via Python-ideas wrote: And I don't understand what point you're making here.  Yes, the walrus operator can appear in various places, how is that relevant? You could write     def

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-31 Thread Rob Cliffe via Python-ideas
as we already have with early-bound defaults. It's easy to argue against a feature by showing that it can be abused. +1.  The same argument (Brendan's) could be used against having e.g. list comprehensions. Rob Cliffe _______ Python-ideas ma

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-31 Thread Rob Cliffe via Python-ideas
m poker): "Put up or shut up".  The first car would never have been built (in 1885 or thereabouts) if the investors had insisted it wasn't worth doing unless it had air bags, satellite GPS, in-car radio and cruise control. PEP 671 will be USEFUL to Python programmers.  We want it! 

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-10-31 Thread Rob Cliffe via Python-ideas
On 31/10/2021 21:54, David Mertz, Ph.D. wrote: On Sun, Oct 31, 2021, 5:39 PM Rob Cliffe via Python-ideas PEP 671 will be USEFUL to Python programmers.  We want it!  (When do we want it?  Now!) This feels dishonest. I believe I qualify as a Python programmer. I started using Python

[Python-ideas] Print and eval

2021-11-01 Thread Evan Greenup via Python-ideas
It would be nice to add the following syntax sugar in Python "Print and Eval" like `ptev a == b` It is same as `statement = "a == b"; print(f"{statement} ? {eval(statement)}")`. It would super nice for debugg

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-11-03 Thread Rob Cliffe via Python-ideas
ted PEP 671 anyway. In short, this "more general feature" is a myth.  A phantom.  And, frankly, an excuse to argue against a PEP which will have immediate benefit to some (lots of?) Python programmers. (I know you differ on that point and I understand why, I just don't yet agree.)

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-11-04 Thread Rob Cliffe via Python-ideas
Taking a step back: Suppose Python didn't have default values AT ALL for function parameters?  Say that unpassed parameters were always set to some sentinel value (maybe None, maybe some special value NotPassed). Would we want to add them to the language? Surely almost everybody would sa

[Python-ideas] pickling decorated function

2021-11-08 Thread Evan Greenup via Python-ideas
Currently pickling decorated function is impossible due to name collision. Because the decorated function is what we want, so it would be nice to add syntax sugar in Python to automatically rename original function with random generated prefix or suffix. This can greatly help the application

[Python-ideas] request for new Executor in `concurrent.futures`

2021-11-08 Thread Evan Greenup via Python-ideas
Executor `UnixForkExecutor` which is based on `os.fork` and shared memory (to return future). The drawback of UnixForkExecutor can only be used on Unix platform. This is not a problem, because the majority people use python for parallel computing on Unix platform. Anyone have any opinion about it

[Python-ideas] Re: PEP 671: Syntax for late-bound function argument defaults

2021-11-08 Thread Rob Cliffe via Python-ideas
there is). Rob Cliffe ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/M2DYBFTF4

[Python-ideas] Re: Make the global/nonlocal keyword a prefix

2021-11-16 Thread Rob Cliffe via Python-ideas
e to write this sort of thing:     global TestsRun = 0, ElapsedTime = 0.0 but it's not a big deal. Rob ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/m

[Python-ideas] Recursive submit in concurrent.future.ProcessPoolExecutor

2021-11-18 Thread Evan Greenup via Python-ideas
Hi, Currrently, is it allowed for process worker to submit new task to its parent executor? Considering the following Python script: ```python3 import concurrent.futures with concurrent.futures.ProcessPoolExecutor(max_workers=12) as ppe: def hello(n: int) -> int: if n =

[Python-ideas] Re: Python Developer’s Guide chinese version

2021-11-22 Thread Julien Palard via Python-ideas
Hi! > I want to know does Python Developer’s Guide have chinese version, If not, i > want to do some translation, may i tell to PSF(or other people) to grant > authorization? IIRC the idea has already been raised by Stéphane Wirtel a few years back, and IIRC the conclusion was &q

[Python-ideas] Re: Should bare logical comparisons raise a warning?

2021-11-25 Thread Rob Cliffe via Python-ideas
l use would be to overload the `==` operator for a DSL. They might be rare, but they are allowed, and the Python interpreter doesn't generally raise warnings for legal expressions used as statement just because they *might* be a mistake. Some compilers and interpreters raise a plethora of warnings, or

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-02 Thread Rob Cliffe via Python-ideas
erator.) Best wishes Rob Cliffe _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archiv

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-02 Thread Rob Cliffe via Python-ideas
On 02/12/2021 03:35, Steven D'Aprano wrote: On Wed, Dec 01, 2021 at 05:16:34PM +1100, Chris Angelico wrote: 1) If this feature existed in Python 3.11 exactly as described, would you use it? Yes I would, but probably not as often as counting cases of the "if param is None: ...&qu

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-02 Thread Rob Cliffe via Python-ideas
o access it as a first-class value. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/l

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-02 Thread Rob Cliffe via Python-ideas
I think that spelling is kinda-sorta obvious for the lambda meaning, and the use you want is kinda-sorta similar to a lambda.  So I *do* understand how you get there... but it still seems like much too much line noise for a very minimal need. Hm.  A word is "vastly less confusing". 

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-02 Thread Rob Cliffe via Python-ideas
, for you all: 1) If this feature existed in Python 3.11 exactly as described, would you use it? Yes, when appropriate. 2) Independently: Is the syntactic distinction between "=" and "=>" a cognitive burden? (It's absolutely valid to say "yes" and "yes&qu

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-02 Thread Rob Cliffe via Python-ideas
parameter unable to retrieve the default, then the implementation is fatally broken. It absolutely is not a feature. It's backward incompatible: 15:03:04 R:\>python Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32 Type "help", &

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-03 Thread Rob Cliffe via Python-ideas
ould return something like, respectively,     "LateBound('[]')"     "[]" I am sure there is code that uses inspect.signature that would be broken, but isn't that inevitable anyway? Best wishes Rob Cliffe ___ Python-

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-03 Thread Rob Cliffe via Python-ideas
On 03/12/2021 22:38, Chris Angelico wrote: On Sat, Dec 4, 2021 at 8:18 AM Rob Cliffe via Python-ideas wrote: On 03/12/2021 19:32, Adam Johnson wrote: The first unwelcome surprise was: >>> def func(a=>[]): ... return a ... >&g

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-03 Thread Rob Cliffe via Python-ideas
On 04/12/2021 01:06, Chris Angelico wrote: On Sat, Dec 4, 2021 at 11:59 AM Rob Cliffe via Python-ideas wrote: On 03/12/2021 22:38, Chris Angelico wrote: On Sat, Dec 4, 2021 at 8:18 AM Rob Cliffe via Python-ideas wrote: On 03/12/2021 19:32, Adam Johnson wrote: The first unwelcome

[Python-ideas] Re: PEP 671 review of default arguments evaluation in other languages

2021-12-04 Thread Rob Cliffe via Python-ideas
Cliffe On 03/12/2021 21:05, Steven D'Aprano wrote: A woefully incomplete review of default argument evaluation in other languages. Updates and corrections are welcome. Out of 22 languages apart from Python: - 3 use early binding (default is evaluated at compile or function definition time);

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-05 Thread Rob Cliffe via Python-ideas
shes Rob Cliffe ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@pyt

[Python-ideas] Re: PEP 671 review of default arguments evaluation in other languages

2021-12-05 Thread Rob Cliffe via Python-ideas
On 05/12/2021 04:01, David Mertz, Ph.D. wrote: The cost here is that EVERY SINGLE student learning Python needs to add this new construct to their mental load. EVERY book and tutorial needs to be updated. EVERY experienced developer has to spend extra effort understanding and writing code

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-05 Thread Rob Cliffe via Python-ideas
admit I may be a overly vociferous in my opposition to this particular change. But I also think your tone has been rather consistently pugnacious, and a bit combative, in dismissing objections or disagreements. I know you genuinely wish to *improve Python*, and believe this PEP *would* do so. But I t

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-06 Thread Rob Cliffe via Python-ideas
On 06/12/2021 09:44, Stephen J. Turnbull wrote: Rob Cliffe via Python-ideas writes: > Nobody has attempted (or at least completed) a PEP, never mind an > implementation, of a "generalized deferred object/type", in the last N > years or decades. Haskell anything. R

[Python-ideas] Re: PEP 671 review of default arguments evaluation in other languages

2021-12-06 Thread Rob Cliffe via Python-ideas
of that cost. If your language supports static storage for functions, you can use that. But in general, without come sort of language support, simulating early binding in a language which only provides late binding is not as easy, convenient or efficient as doing it the other way. _____

[Python-ideas] Re: PEP 671 review of default arguments evaluation in other languages

2021-12-06 Thread Rob Cliffe via Python-ideas
On 06/12/2021 23:13, Steven D'Aprano wrote: On Mon, Dec 06, 2021 at 10:17:06AM +, Rob Cliffe via Python-ideas wrote: If your language only has one, early binding is better. That's your opinion.  It's not mine.  Witness the Stack Overflow questions asking why `def f(ar

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-07 Thread Rob Cliffe via Python-ideas
On 07/12/2021 18:22, Stephen J. Turnbull wrote: Rob Cliffe via Python-ideas writes: > I think you're making my point. *shrug* You wrote "object", I took you at your word. > You're saying that the object part isn't that hard, but other parts of > it

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-08 Thread Rob Cliffe via Python-ideas
. Best wishes Rob Cliffe _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-08 Thread Rob Cliffe via Python-ideas
examples (in Python pseudo-code perhaps) showing how *deferred evaluation* would be useful for a concrete task?  (Solving an equation.  Drawing a graph.  Analysing a document.  Manufacturing a widget.  Planning a journey.  Firing a missile.  Anything!  You name it.) Best wishes Rob Cliffe On 08/12

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-08 Thread Rob Cliffe via Python-ideas
On 08/12/2021 23:09, David Mertz, Ph.D. wrote: On Wed, Dec 8, 2021, 5:55 PM Rob Cliffe via Python-ideas But AIUI (i.e. practically not at all) Dask is about parallel computing, which is not the same thing as deferred evaluation, though doubtless they overlap. Again AIUI, parallel

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-08 Thread Rob Cliffe via Python-ideas
GAIN] "Regardless of the syntax, having the potential for def-time and call-time behavior to be mixed and interleaved in arbitrary ways within the same function signature is confusing."     4. [OBJECTION D] 'Currently anything that is a function default is some kind of Python object tha

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-09 Thread Rob Cliffe via Python-ideas
fault unless there is a value that gets saved.  Otherwise it is just behavior in the function. Remember, a late-bound default is most similar to this code: def f(a=): if a was omitted: a = And in that form, the code isn't available as a first-class object. That's why I say

[Python-ideas] Re: Should Python enforce Type-checking in the future?

2021-12-09 Thread Rob Cliffe via Python-ideas
Please, no, No, NO! It has always been the policy that typing is, and will remain, optional. On 09/12/2021 20:32, deavid wrote: Hi, I would like to hear the opinion of Python's community on enforcing types in the future for the language. I've been using Python as my main la

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2021-12-12 Thread Rob Cliffe via Python-ideas
s not Chris A's job to try to clarify what *he thinks they mean*, which is what you appear to be saying (if not, what *are* you saying by "channel others' thinking"?). Best wishes Rob Cliffe_______ Python-ideas mailing list

[Python-ideas] Re: Add a `count` argument to `list.remove`

2021-12-21 Thread Rob Cliffe via Python-ideas
del the_list[idx] num -= 1 else: idx += 1 With a `count` argument to `list.remove`, this is how it would be done: the_list.remove(element_to_remove, count=num) (Doesn't necessarily have to be a keyword argument) Is this a good idea? ___

[Python-ideas] Re: Revisiting a frozenset display literal

2022-01-16 Thread Rob Cliffe via Python-ideas
Yeah, I think that ship has sailed. Double punctuation just isn't Python's thing, so there aren't really any good ways to shoehorn more data types into fewer symbols. ChrisA ___ Python-ideas mailing list -- [email protected] To

[Python-ideas] Re: Revisiting a frozenset display literal

2022-01-16 Thread Rob Cliffe via Python-ideas
already say a = frozenset({i+1 for i in range(3)}) which is not too bad. On Sun, 16 Jan 2022 at 14:14, Rob Cliffe via Python-ideas wrote: How about fs{1, 2, 3} ? Best wishes Rob Cliffe On 16/01/2022 12:41, Chris Angelico wrote: > On Sun, Jan 16, 2022 at 11

[Python-ideas] Re: Revisiting a frozenset display literal

2022-01-16 Thread Rob Cliffe via Python-ideas
On 17/01/2022 00:16, Steven D'Aprano wrote: On Sun, Jan 16, 2022 at 01:11:13PM +, Rob Cliffe via Python-ideas wrote: How about     fs{1, 2, 3} What does the "s" add that the set {1, 2, 3} doesn't already tell us? It helps to distinguish it from     f(1, 2, 3)     f

[Python-ideas] Re: Revisiting a frozenset display literal

2022-01-17 Thread Ronald Oussoren via Python-ideas
is executed. Frozenset itself is not faster than a regular set. Ronald — Twitter / micro.blog: @ronaldoussoren Blog: https://blog.ronaldoussoren.net/ ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to py

[Python-ideas] Re: Revisiting a frozenset display literal

2022-01-18 Thread Rob Cliffe via Python-ideas
t is a container of things, too). These differences make is a lot easier to choose, ahead of time, which one makes sense before you have even written the line of code. Maybe I'm making too much of this, but I really like the idea of deciding at the END of the set literal whether to

[Python-ideas] Re: Revisiting a frozenset display literal

2022-01-18 Thread Rob Cliffe via Python-ideas
liffe ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@pytho

[Python-ideas] Re: Revisiting a frozenset display literal

2022-01-21 Thread Rob Cliffe via Python-ideas
;s true of anything: you have to learn Python syntax to use Python. The fact that {1,2,3} is a set and f{1,2,3} is a frozenset is not difficult to explain or to understand, especially in a language that already uses single letter prefixes for other things. The .frozen() method is a strangely in

[Python-ideas] Re: Unit variables upon their first appearance

2022-02-05 Thread Rob Cliffe via Python-ideas
t time) Dic =  {} # format fruit:count For fruit in fruits:    Dic[fruit]:= 0    Dic[fruit]+=1 Would be great to hear your feedback. Thanks. Moj _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to python-ideas-le.

Re: [Python-ideas] Redefining method

2018-07-30 Thread Chris Barker via Python-ideas
roblems that "action at a distance" > effects, like monkeypatching class definitions, can cause in a code > base. > > -- > Nick Coghlan | [email protected] | Brisbane, Australia > ___ > Python-ideas mailing list > Python-i

Re: [Python-ideas] With expressions

2018-08-02 Thread Thomas Nyberg via Python-ideas
don't see any real advantage here other than the non-advantage of being able to write one-liners. Paul ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/co

Re: [Python-ideas] With expressions

2018-08-02 Thread Thomas Nyberg via Python-ideas
t given how open() works and that it looks similar superficially. Cheers, Thomas ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] With expressions

2018-08-02 Thread Thomas Nyberg via Python-ideas
homas ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] With expressions

2018-08-03 Thread Chris Barker via Python-ideas
On Fri, Aug 3, 2018 at 3:49 AM, Robert Vanden Eynde wrote: > > When I say "functional programming", I speak about the paradigm used in > language like Haskell. In language like those, all constructs are > "expression-based". > sure -- but Python is explicitl

Re: [Python-ideas] Revisiting dedicated overloadable boolean operators

2018-08-03 Thread Chris Barker via Python-ideas
) 526-6317 main reception [email protected] ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Revisiting dedicated overloadable boolean operators

2018-08-06 Thread Chris Barker via Python-ideas
amp;R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Revisiting dedicated overloadable boolean operators

2018-08-06 Thread Chris Barker via Python-ideas
ponse Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______ Python-ideas mailing list [email protected] https://mail.

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

2018-08-08 Thread Ronald Oussoren via Python-ideas
e reading from generators. But that wouldn't be helpful, obviously. It is also possible to fix the particular issue by using another with statement, that is use: with contextlib.closing(read_multiple(…)) as chunks: for contents in chunks: … Automatically closing the generator at t

Re: [Python-ideas] Python certification

2018-08-09 Thread Chris Barker via Python-ideas
start to develop a certification. Here's a couple of Python syllabuses (the first proprietary, the > second perhaps open) > > https://www.microsoft.com/en-us/learning/exam-98-381.aspx > https://pythoninstitute.org/pcap-exam-syllabus/ I am developing this: https://uwpce-pythoncert.github.

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

2018-08-14 Thread Chris Barker via Python-ideas
5 (206) 526-6317 main reception [email protected] ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

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

2018-08-14 Thread Chris Barker via Python-ideas
ere any other name can be used (as opposed to say, def) Either this entire section is irrelevant or you meant to explain that there > is only one "NoneType" object. > > Constant is a bit of a loaded term in Python, and I think you've fallen > foul of it here. >

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

2018-08-15 Thread Chris Barker via Python-ideas
rd, and just like any other keyword, it can't be re-bound. > > > >> it's only a keyword because Python doesn't otherwise have a way of > creating non-rebindable names. It's purpose is to represent the singular > object of NoneType, and in that sense it'

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

2018-08-16 Thread Chris Barker via Python-ideas
(206) 526-6317 main reception [email protected] ___ Python-ideas mailing list [email protected] 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-16 Thread Chris Barker via Python-ideas
...: In [32]: test_locals() locals passed in: {'b': 2, 'a': 1} locals after adding {'b': 2, 'a': 1, 'fred': 5} {'b': 2, 'a': 1, 'fred': 5} fred: 5 It seems you CAN modify the locals dict passed in, and the change will show up in the enclosing scope. But it sounds like that is not guaranteed by the language. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] ___ Python-ideas mailing list [email protected] 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-16 Thread Chris Barker via Python-ideas
. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______

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

2018-08-17 Thread Chris Barker via Python-ideas
CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] ___

Re: [Python-ideas] Off topic: 'strike a balance' - second language English

2018-08-20 Thread Chris Barker via Python-ideas
e people are likely to encounter the term elsewhere. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chri

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

2018-08-20 Thread Chris Barker via Python-ideas
fies that object -- will, or will not, the local namespace be altered? Saying it "may" be altered is kind of crazy! Does that mean the same code will have a different effect if run in two different (compliant) implementations of Python? That sure seems like a bad idea... > more so, I do

Re: [Python-ideas] Off topic: 'strike a balance' - second language English

2018-08-22 Thread Chris Barker via Python-ideas
e it easier for newbies, and in the end, you'd end up with something like iPython. Honestly, Python does "suffer" a bit when in competition with commercial products, in that it is a language (and an implementation of that language), not an entire programming environment. So to use

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

2018-08-22 Thread Chris Barker via Python-ideas
reception [email protected] _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] A GUI for beginners and experts alike (Mike Barnett)

2018-08-24 Thread Chris Barker via Python-ideas
329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Chris Barker via Python-ideas
pleGUI doesn't cover, what are your options? > This is key -- and one of the real issues around wrapping multiple GUI back-ends -- you end up having to do a lot of re-implementation of details. In fact, I always thought Pyton_guiu above really suffered from that conceptually. For example,

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Chris Barker via Python-ideas
on NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] ___ Python-ideas mailing list [email protected] https://mail.python.org/mai

Re: [Python-ideas] Add recordlcass to collections module

2018-09-04 Thread Chris Barker via Python-ideas
n/stable/hashing.html >> > > There is correction: > recordclass and it's base memoryslots didn't implement __hash__, but > memoryslots implement richcompare (almost as python's list). > >> >> >>> >>>> On Sunday, September 2, 201

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

2018-09-08 Thread Julien Palard via Python-ideas
o/ > IMHO a better usage of the PSF funding would be to organize some local > sprints to translate the Python documentation. That's what we're already doing here in France for the french translation, and the PSF is already fouding them (thanks!) in Paris [1] and the AFPy [2] i

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

2018-09-10 Thread Chris Barker via Python-ideas
onse Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] ___ Python-ideas mailing list [email protected] https://mail.pyt

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

2018-09-11 Thread Chris Barker via Python-ideas
se Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______ Python-ideas mailing list [email protected] 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-11 Thread Chris Barker via Python-ideas
hat much state > in a function call, maybe you should have a class that holds that state? Or > pass in a **kwargs dict? > > > Kwargs isn’t good because it breaks static analysis which we really want. > well, Python isn't a static language, and I personally have my doubts about tr

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

2018-09-15 Thread Chris Barker via Python-ideas
On Sat, Sep 15, 2018 at 7:38 PM, Antoine Pitrou wrote: > To be fair, in my > > experience this has been a source of confusion to many Python > > newcomers, as the notion of "beauty", as with any other value > > judgment, is highly relative to the subject

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

2018-09-20 Thread Chris Barker via Python-ideas
ever participate in any other type of discussion forum regularly. -CHB > ___ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofc

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

2018-09-20 Thread Chris Barker via Python-ideas
06) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

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

2018-09-20 Thread Chris Barker via Python-ideas
&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

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

2018-09-20 Thread Chris Barker via Python-ideas
> >> Can you quote pep1? I think you’re wrong. > > > > > > I can't remember if I pulled this quote previously (that's one of the > > > troubles with emails): "Following a discussion on python-ideas, the > > > proposal should be submitted as a draft PE

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

2018-09-21 Thread Chris Barker via Python-ideas
On Fri, Sep 21, 2018 at 1:24 PM James Lu wrote: > One of the reasons Guido left was the insane volume of emails he had to > read on Python-ideas. > You'd have to ask Guido directly, but I don't think so. It wasn't the volume, but the nature and timing of the discussi

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

2018-09-26 Thread Chris Barker via Python-ideas
On Tue, Sep 25, 2018 at 10:10 PM Lee Braiden wrote: > It's the reason why type checking exists, and why bounds checking exists, > and why unit checking exists too. > And yet Python has none of those. They all provide safety, but also place a burden on the developer. So why use P

Re: [Python-ideas] Add .= as a method return value assignment operator

2018-09-27 Thread Stelios Tymvios via Python-ideas
gt;> Hi Jasper, >> This seems like a great idea! It looks so much cleaner, too. >> >> Would there be a dunder method handling this? Or since it's explicitly just >> a syntax for "obj = obj.method()" is that not necessary? >> My only qualm is that this mig

Re: [Python-ideas] Suggestion: Extend integers to include iNaN

2018-09-30 Thread Mital Ashok via Python-ideas
expecting an int, a nan-aware int might not work. It seems more like int is a subclass of nan-aware int. Another idea is having it as a completely different class. int can be made a virtual subclass of it. This can be implemented in pure Python too. However, I do not think there is a strong enough

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