[Python-ideas] Re: On the history and usage of vars [was Re: Re: Unpack operator "**" and Mapping]

2020-12-30 Thread Steve Barnes
>len() is an important abstraction for containers, and its usage deserves a >short name (just like unary minus and abs() for numbers). This is crucial even >though >you have to use its "true name" >(https://xkcd.com/2381/

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

2018-08-14 Thread Steve Barnes
On 14/08/2018 20:42, Michael Selik wrote: > > Good comparisons can be found in other fields: > * Driving -- brakes vs stoppers > * Sailing -- starboard vs right-side > * Medicine -- postprandial vs after-meal > * Biology -- dinosaur vs direlizard > While NOT wanting to start another fight I fe

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

2018-08-18 Thread Steve Barnes
On 18/08/2018 10:34, Jonathan Fine wrote: > Summary: I look at the phrase 'strike a balance' in different languages, > and rewrite some wikipedia text on accessibility. > > I found in https://en.wikipedia.org/wiki/Jargon#Accessibility_issues > === > There is a balance to be struck, as excessive

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

2018-08-21 Thread Steve Barnes
On 21/08/2018 17:55, Jonathan Fine wrote: > Nick Loadholtes wrote (elsewhere, quoted in this thread - by me). > >> Make your docs work as hard as your code does. Clear examples will >> make your code stand out in a good way. > > With a bit more searching I found: > > https://www.reddit.com/r/

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

2018-08-23 Thread Steve Barnes
On 24/08/2018 02:04, Mike Barnett wrote: > Wow, Thank you Steve! > > > This is exactly the kind of information I was hoping for!! > > > >> Acceptance for *what* precisely? > > That is a great question... you're right shoulda asked a specific question. > > I would like to see if become som

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

2018-09-10 Thread Steve Barnes
On 10/09/2018 22:00, Ethan Furman wrote: > On 09/10/2018 12:52 PM, Chris Barker via Python-ideas wrote: > >> I've spent this whole thread thinking: "who in the world is writing >> code with a lot of spam=spam arguments? If you are transferring that >> much state in a function call, maybe you s

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

2018-09-12 Thread Steve Barnes
On 12/09/2018 16:38, Steven D'Aprano wrote: > On Wed, Sep 12, 2018 at 03:58:25PM +0100, Jonathan Fine wrote: > >> My question is about correctly implementing of __params__ as a keyword >> identifier, with semantics as in Steve B's code snippet above. > > The semantics of Steve's code snippet a

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

2018-09-16 Thread Steve Barnes
On 16/09/2018 10:45, David Mertz wrote: > You have missed the use of *reductio ad absurdum* in my comment and > several others. This argument structure is one of the fundamental forms > of good logical reasoning, and shows nothing dismissive or insulting. > The specifics book titles I used we

Re: [Python-ideas] Combine f-strings with i18n - How about using PEP 501?

2018-09-18 Thread Steve Barnes
On 18/09/2018 08:59, Hans Polak wrote: > >>> I don't see how this immediately helps the OP, who wants a *literal* >>> expression that automatically invokes the translation machinery as >>> well as the interpolation machinery. > Actually, no, I do not want the expression to be automatically > t

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

2018-09-28 Thread Steve Barnes
One of the strengths of the IEEE float, (to set against its many weaknesses), is the presence of the magic value NaN. Not a Number, or NaA, is especially useful in that it is a valid value in any mathematical operation, (always returning NaN), or comparison, (always returning False). In functio

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

2018-09-29 Thread Steve Barnes
On 29/09/2018 07:52, Nathaniel Smith wrote: > On Fri, Sep 28, 2018 at 11:31 PM, Steve Barnes wrote: >> One specific use case that springs to mind would be for Libraries such >> as Pandas to return iNaN for entries that are not numbers in a column >> that it has been told

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

2018-09-29 Thread Steve Barnes
On 29/09/2018 08:18, Michael Selik wrote: > On Fri, Sep 28, 2018 at 11:32 PM Steve Barnes wrote: >> One of the strengths of the IEEE float, (to set against its many >> weaknesses), is the presence of the magic value NaN. Not a Number, or >> NaA, is especially useful in tha

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

2018-09-29 Thread Steve Barnes
On 29/09/2018 08:24, Serhiy Storchaka wrote: > 29.09.18 09:31, Steve Barnes пише: >> I think that it should be relatively simple to extend the Python integer >> class to have a NaN flag, possibly by having a bit length of 0, and have >> it follow the same rules for the handl

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

2018-09-29 Thread Steve Barnes
On 29/09/2018 08:50, Serhiy Storchaka wrote: > 29.09.18 10:35, Steve Barnes пише: >> On 29/09/2018 08:24, Serhiy Storchaka wrote: >>> 29.09.18 09:31, Steve Barnes пише: >>>> I think that it should be relatively simple to extend the Python >>>> integer

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

2018-09-29 Thread Steve Barnes
On 29/09/2018 14:00, Steven D'Aprano wrote: > On Sat, Sep 29, 2018 at 06:31:46AM +0000, Steve Barnes wrote: > >> One of the strengths of the IEEE float, (to set against its many >> weaknesses), > > o_O > > Since I'm old enough to (just barely) re

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

2018-09-29 Thread Steve Barnes
On 29/09/2018 09:56, Serhiy Storchaka wrote: > 29.09.18 11:43, Steve Barnes пише: >> On 29/09/2018 08:50, Serhiy Storchaka wrote: >>> Python is dynamically typed language. What is such processing that would >>> work with iNaN, but doesn't work with float('

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

2018-09-30 Thread Steve Barnes
On 30/09/2018 13:55, Steven D'Aprano wrote: > On Sun, Sep 30, 2018 at 12:09:45PM +0300, Serhiy Storchaka wrote: >> 30.09.18 04:07, Steven D'Aprano пише: >>> Telling people that they don't understand their own code when you don't >>> know their code is not very productive. >> >> I can't tell him w

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

2018-09-30 Thread Steve Barnes
On 30/09/2018 15:15, David Mertz wrote: > For similar reasons, I'd like an iInf too, FWIW.  It's good for an > overflow value, although it's hard to get there in Python ints (would > 'NaNAwareInt(1)/0' be an exception or iInf?).  Bonus points for anyone > who knows the actual maximum size of P

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

2018-09-30 Thread Steve Barnes
On 30/09/2018 15:48, Chris Angelico wrote: > On Mon, Oct 1, 2018 at 12:45 AM Anders Hovmöller wrote: >> But making any change to the basic types truth table is a big -1 from me. >> This seems like a Python 2-3 transition to me. >> > > Far FAR worse than anything that changed in Py2->Py3. > >

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

2018-09-30 Thread Steve Barnes
On 30/09/2018 16:13, David Mertz wrote: > On Sun, Sep 30, 2018 at 11:01 AM Steve Barnes <mailto:gadgetst...@live.co.uk>> wrote: > > Adding inf & -inf would be nice but to do so we would need a better > name > than NaNAwareInt. > > > My placeho

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

2018-09-30 Thread Steve Barnes
On 30/09/2018 16:26, David Mertz wrote: > On Sun, Sep 30, 2018 at 11:17 AM Steve Barnes <mailto:gadgetst...@live.co.uk>> wrote: > > Note that my statements above had a single = i.e. > float(NaNAwareInt('nan')) produces float('nan

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

2018-09-30 Thread Steve Barnes
On 30/09/2018 16:36, David Mertz wrote: > On Sun, Sep 30, 2018 at 11:31 AM Steve Barnes <mailto:gadgetst...@live.co.uk>> wrote: > > No complex can be converted to float without accessing either the real > or imag component. > > > Sure. Not in Python 3.7.

Re: [Python-ideas] Consistency in naming [was Re: ...ALL CAPS]

2019-02-03 Thread Steve Barnes
nice to change it so that the > > class was DateTime. But changing it *now* is not free, it has real, > > serious costs which are probably greater than the benefit gained. > Why can’t we put “now” as a property of the module itself, reccomend that, and > formally deprecate but never

Re: [Python-ideas] Discuss: what should statistics.mode do?

2019-02-18 Thread Steve Barnes
s, I mostly imagined that mode() would be used interactively, using the interpreter as a calculator.) Would changing the behaviour break your code? Note that this question is seperate from that of whether or not there should be a multimode function. [Steve Barnes] Can I suggest that one opti

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

2019-02-18 Thread Steve Barnes
s because of line length, plus the issues already mentioned. / Anders [Steve Barnes] If you are getting to 40 spaces of indent, (for _most_ people that is 10 scope changes, e.g. fn then 9 levels of if), then you are already facing a major cognitive burden and should probably be refactoring.

Re: [Python-ideas] Add a "week" function or attribute to datetime.date

2019-03-04 Thread Steve Barnes
If anybody is looking for such components then wx.DateTime (https://wxpython.org/Phoenix/docs/html/datetime_overview.html) it is derived from wxDateTime (https://docs.wxwidgets.org/3.1/classwx_date_time.html) and should support all of its methods including things like DST changes, etc., support

Re: [Python-ideas] zipfile refactor and AES

2019-06-03 Thread Steve Barnes
One specific pain point with zipfile is that if you zip a directory that contains the target zip file you end up trying to add the target file to itself which leads to a rapidly growing archive. From: Python-ideas On Behalf Of Robert Collins Sent: 03 June 2019 21:12 To: Daniel Hillier Cc: Pyt

[Python-ideas] Suggestion: Windows launcher default to not using pre-releases by default

2019-07-08 Thread Steve Barnes
g to undertake the changes. Steve Barnes ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at h

[Python-ideas] Re: Suggestion: Windows launcher default to not using pre-releases by default

2019-07-10 Thread Steve Barnes
fast & future proof (addressing Ben's concerns). -Original Message- From: Alex Walters Sent: 10 July 2019 07:23 To: 'Steve Barnes' ; 'Python-Ideas' Subject: RE: [Python-ideas] Suggestion: Windows launcher default to not using pre-releases by default I have

[Python-ideas] Re: Suggestion: Windows launcher default to not using pre-releases by default

2019-07-10 Thread Steve Barnes
Brett, Can I suggest that it might be an idea to add the honouring of PY_PYTHON and PY_PYTHON2 environmental variables to the help text. This is the missing piece as far as I am concerned. Steve From: Brett Cannon Sent: 10 July 2019 18:41 To: Steve Barnes Cc: Python-Ideas Subject: Re

[Python-ideas] Re: Suggestion: Windows launcher default to not using pre-releases by default

2019-07-10 Thread Steve Barnes
Issue raised as bpo-37556 & a PR as #14701 Steve Barnes From: Brett Cannon Sent: 10 July 2019 22:06 To: Steve Barnes Cc: Python-Ideas Subject: Re: [Python-ideas] Re: Suggestion: Windows launcher default to not using pre-releases by default I'll also mention it's covered in the

[Python-ideas] Re: Stdlib Module

2019-07-15 Thread Steve Barnes
Just out of interest there must be something like this in venv - how else can it decide what to include in the virtual environment as copies or links? That would give the platform specific list. Steve Barnes -Original Message- From: Chris Angelico Sent: 16 July 2019 06:21 To: python

[Python-ideas] Suggest having a mechanism to distinguish import sources

2019-11-07 Thread Steve Barnes
Hi, I hope that his hasn't been discussed to death in the past but I quite often encounter cases where developers have unwittingly created a file or directory that has a name clash with either a system import or a pip installed library import. This can be very confusing to new users! And, of co

[Python-ideas] Re: Suggest having a mechanism to distinguish import sources

2019-11-09 Thread Steve Barnes
? perhaps by adding a level keyword argument to the __import__ built in. __import__ already has a 'level' argument. [Steve Barnes] To be honest this is the first that I have heard of __import__(level) but looking at the docs and help for 3.8 doesn’t read like what you describe below – m

[Python-ideas] Re: Testing for NANs [was Re: Fix statistics.median()?]

2019-12-28 Thread Steve Barnes
Personally I still like the fundamental: def is_nan(num): “”” Test for NaN “”” return num != num So simple! From: Christopher Barker Sent: 28 December 2019 07:54 To: gu...@python.org Cc: python-ideas Subject: [Python-ideas] Re: Testing for NANs [was Re: Fix statistics.median()?] opps,

[Python-ideas] Re: Testing for NANs [was Re: Fix statistics.median()?]

2019-12-28 Thread Steve Barnes
From: Andrew Barnert Sent: 28 December 2019 20:21 To: Steve Barnes Cc: Christopher Barker ; gu...@python.org; python-ideas Subject: Re: [Python-ideas] Re: Testing for NANs [was Re: Fix statistics.median()?] On Dec 28, 2019, at 00:03, Steve Barnes mailto:gadgetst...@live.co.uk>>

[Python-ideas] Re: Testing for NANs [was Re: Fix statistics.median()?]

2019-12-29 Thread Steve Barnes
y to get a sNAN out as the result of any Decimal operation. Invalid operations will either return a quiet NAN, or raise. Either way, float or Decimal, the only way to get a sNAN in your data is to put it there yourself. Why not just raise at the point of inserting the ~~landmine~~ sNAN instead

[Python-ideas] Re: Testing for NANs [was Re: Fix statistics.median()?]

2019-12-29 Thread Steve Barnes
From: David Mertz Sent: 29 December 2019 15:58 To: Steve Barnes Cc: Steven D'Aprano ; python-ideas Subject: Re: [Python-ideas] Re: Testing for NANs [was Re: Fix statistics.median()?] On Sun, Dec 29, 2019, 10:51 AM Steve Barnes mailto:gadgetst...@live.co.uk>> wrote: I do have

[Python-ideas] Re: more readable "if" for multiple "in" condition

2020-01-01 Thread Steve Barnes
rguments they are all tested for truth but if a single argument then it must be an iterable. Steve Barnes P.S. Happy New Year & RIP Python 2. -Original Message- From: Steven D'Aprano Sent: 01 January 2020 02:01 To: python-ideas@python.org Subject: [Python-ideas] Re: more

[Python-ideas] Re: python -m anomaly Was: quality of life improvements

2020-01-10 Thread Steve Barnes
lready exists, both for running scripts on the path using -m and scripts with arbitrary file names without -m. Have I missed some subtlety in your proposal? [Steve Barnes] I did notice one anomaly in the behaviour of python -m: taking your code structure above and using : > py -mzipfile -c

[Python-ideas] Re: PyPI should include PEP 440-compliant version strings for including in install_requires

2020-02-10 Thread Steve Barnes
n't mandate it. Most of the time, it won't matter, so don't create problems downstream. ChrisA [Steve Barnes] Good points above! I know that this discussion is about pip requires versioning but I would like to add one point were it is important to pin to __exact__ releases for

[Python-ideas] IDEA: Allow override of all assignments of a built in type to be a different type

2020-03-05 Thread Steve Barnes
se interpreter I do not think that this is a suitable one for an external PyPi library or at least some hooks in the interpreter would be required to make it possible. Any thoughts, feedback, interest, expressions of horror? Or is this already t

[Python-ideas] Re: IDEA: Allow override of all assignments of a built in type to be a different type

2020-03-05 Thread Steve Barnes
Comments in-line (I wish Outlook would behave sensibly) -Original Message- From: Paul Moore Sent: 05 March 2020 09:52 To: Steve Barnes Cc: python-ideas@python.org Subject: Re: [Python-ideas] IDEA: Allow override of all assignments of a built in type to be a different type On Thu, 5

[Python-ideas] Re: IDEA: Allow override of all assignments of a built in type to be a different type

2020-03-05 Thread Steve Barnes
Fascinating material André. I am sure that some people would love the idea of a fractional or decimal iterator, (as long as they don’t try to use it as an index). Steve From: André Roberge Sent: 05 March 2020 09:56 To: Steve Barnes Cc: python-ideas@python.org Subject: Re: [Python-ideas] IDEA

[Python-ideas] Re: IDEA: Allow override of all assignments of a built in type to be a different type

2020-03-05 Thread Steve Barnes
-Original Message- From: Chris Angelico Sent: 05 March 2020 11:42 To: python-ideas@python.org Subject: [Python-ideas] Re: IDEA: Allow override of all assignments of a built in type to be a different type On Thu, Mar 5, 2020 at 8:27 PM Steve Barnes wrote: > > One of the

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

2020-03-22 Thread Steve Barnes
I personally think that there is a better case for an ignore_case flag – the number of times that I have been caught out with [‘a.doc’, ‘b.Doc’, ‘c.DOC’] especially on MS platforms. Steve Barnes From: Kyle Stanley Sent: 23 March 2020 05:49 To: Stephen J. Turnbull Cc: python-ideas Subject

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Steve Barnes
answers your problem. Steve Barnes -Original Message- From: Frédéric De Jaeger Sent: 23 March 2020 18:00 To: python-ideas@python.org Subject: [Python-ideas] About python3 on windows Hi all, There is a recurring problem in my company where we use python in various places (python3). We

[Python-ideas] Re: About python3 on windows

2020-03-24 Thread Steve Barnes
https://docs.python.org/3.8/using/windows.html#installing-without-ui gives details of all of the options. The Microsoft Store version does not offer any options full stop! From: Kyle Stanley Sent: 24 March 2020 18:10 To: Frédéric De Jaeger Cc: Python-ideas < > Subject: [Python-ideas] Re: About

[Python-ideas] Re: About python3 on windows

2020-03-25 Thread Steve Barnes
Of course if, rather than creating symlinks, you create a batch file called python3.bat and containing the line: @py -3 %* Then save it to somewhere on your path, e.g. the python scripts directory, then issuing, from the command line or another batch file the command python3 should just work (as

[Python-ideas] Aside RE: Re: macaddress or networkaddress module

2020-04-06 Thread Steve Barnes
As an aside I have a perfect example to back up what Paul is saying below. I work for a large corporation where developers are permitted to install python modules on their development machines, (subject to some licence restrictions), but the proxy settings required to get to PyPi vary from user

[Python-ideas] Re: Adding a "once" function to functools

2020-04-28 Thread Steve Barnes
n(): """ Finished with gun for now """ draw.reset() One of the issues that newcomers to iterators suffer from is the fact that you need to delete and recreate them if you need to re-use them from the beginning however removing and redefining a function is much

[Python-ideas] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-04 Thread Steve Barnes
e that is used to extend the exhausted iterator(s). I think that this would also work well for map as well. Steve Barnes (sorry for top posting - Outlook) -Original Message- From: MRAB Sent: 04 May 2020 17:55 To: python-ideas@python.org Subject: [Python-ideas] Re: PEP 618: Add O

[Python-ideas] Improve handling of Unicode quotes and hyphens

2020-05-10 Thread Steve Barnes
icit is better than implicit but still leaves it to the user to correct the erroneous input (which could be argued is both good and bad). I would like to suggest that an incremental approach might be the best - clarifying the existing error message being the thing that should not break anything and

[Python-ideas] Re: Improve handling of Unicode quotes and hyphens

2020-05-10 Thread Steve Barnes
smart quotes. Very clever! My mail client prefers the plain text part when it is available, which is usually exactly what I would want. But in this case, it confused me for a bit. -- Steven [Steve Barnes] So we currently have a situation where not only does whether code works or not depends o

[Python-ideas] Re: Improve handling of Unicode quotes and hyphens

2020-05-10 Thread Steve Barnes
erything but potentially user code could be using these characters legitimately inside of strings or comments e.g. the copywrite symbol. Steve Barnes -Original Message- From: Andrew Barnert Sent: 10 May 2020 21:17 To: Steve Barnes Cc: python-ideas@python.org Subject: Re: [Python-ideas]

[Python-ideas] Re: Improve handling of Unicode quotes and hyphens

2020-05-10 Thread Steve Barnes
My personal experience of the most common problematic substitutions by tools such as Outlook, Word & some web tools: 1. Double Quotes \u201c & \u201d “” 2. Single Quotes \u2018 & \u2019 ‘’ 3. The m-hyphen \2013 – 4. Copyright © \xa9 and others, Registered ® \xae and trademark ™ \u2122

[Python-ideas] Re: Improve handling of Unicode quotes and hyphens

2020-05-11 Thread Steve Barnes
-Original Message- From: Steven D'Aprano Sent: 11 May 2020 06:02 To: python-ideas@python.org Subject: [Python-ideas] Re: Improve handling of Unicode quotes and hyphens On Mon, May 11, 2020 at 04:28:38AM +0000, Steve Barnes wrote: > So we currently have a situation where

[Python-ideas] Re: Improve handling of Unicode quotes and hyphens

2020-05-11 Thread Steve Barnes
From: David Mertz Sent: 11 May 2020 08:34 To: Steve Barnes Cc: python-ideas@python.org Subject: Re: [Python-ideas] Re: Improve handling of Unicode quotes and hyphens A third-party module on PyPI for "fix-the-horrible-things-Outlook-does" could be useful. There is no way the standa

[Python-ideas] How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-21 Thread Steve Barnes
eing exceeded? Steve Barnes ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/arch

[Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-21 Thread Steve Barnes
file then the problem would not occur so I guess that it would need to be patched in a transparent manner. Steve Barnes -Original Message- From: remi.lape...@henki.fr Sent: 21 May 2020 13:56 To: python-ideas@python.org Subject: [Python-ideas] Re: How to propose a change with tests

[Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-22 Thread Steve Barnes
From: Guido van Rossum Sent: 21 May 2020 16:59 To: Steve Barnes Cc: remi.lape...@henki.fr; python-ideas@python.org Subject: Re: [Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous Hi Steve, Have you considered and

[Python-ideas] Re: len(path) == len(str(path))

2020-05-24 Thread Steve Barnes
familiar option, (for those used to the bash shell), would be to use a bare - as the marker for where to put the result(s) from the previous stage. Steve Barnes -Original Message- From: Stephen J. Turnbull Sent: 25 May 2020 02:28 To: Dan Sommers <2qdxy4rzwzuui...@potatochowder.com&

[Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-25 Thread Steve Barnes
script.txt - it does need to be run as admin. Steve Barnes -Original Message- From: Steven D'Aprano Sent: 25 May 2020 15:34 To: python-ideas@python.org Subject: [Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous On Fri

[Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-25 Thread Steve Barnes
Server 2008 R2, Windows Server 2008 which I think covers all of the currently supported versions of Windows. -Original Message- From: Steve Barnes Sent: 25 May 2020 18:56 To: Steven D'Aprano ; python-ideas@python.org Subject: [Python-ideas] Re: How to propose a change with tests wher

[Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-06-01 Thread Steve Barnes
-Original Message- From: Eryk Sun Sent: 02 June 2020 02:02 To: python-ideas@python.org Cc: Christopher Barker ; Steve Barnes Subject: Re: [Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous On 5/25/20

[Python-ideas] Re: Bringing the print statement back

2020-06-11 Thread Steve Barnes
is as your preference. There are other benefits as well. So I would suggest simply pip install ipython and type one extra letter when starting your python REPL. Steve Barnes -Original Message- From: Greg Ewing Sent: 11 June 2020 07:51 To: python-ideas@python.org Subject: [Python-ideas] Re: Br

[Python-ideas] Re: For quicker execution, don't refcount objects that can't be deleted

2020-06-14 Thread Steve Barnes
behavior, you'd have to either change the refcount type from ssize_t to size_t, or else keep the DECREF calls and set the initial value to something like PY_SSIZE_T_MAX/2.) [Steve Barnes] Of course if we had a NaN value for integers, int('NaN'), then we could just set the initial c

[Python-ideas] Re: For quicker execution, don't refcount objects that can't be deleted

2020-06-15 Thread Steve Barnes
-Original Message- From: Greg Ewing Sent: 15 June 2020 07:23 To: python-ideas@python.org Subject: [Python-ideas] Re: For quicker execution, don't refcount objects that can't be deleted On 15/06/20 5:11 pm, Steve Barnes wrote: > Of course if we had a NaN value for integ

[Python-ideas] Re: Amend PEP-8 to require clear, understandable comments instead of Strunk & White Standard English comments

2020-06-27 Thread Steve Barnes
I found this in the code base I did manage to get it replaced but not without resistance from some parties). Personally I think that community guidelines is better than trying to spell out what is unacceptable in a document such as PEP-8. Steve Barnes -Original Message- From: Greg Ewing

[Python-ideas] Re: Else assert statement

2020-07-02 Thread Steve Barnes
a':a, 'b':b, 'c':c, } def foo_default_handler(): """ Handler for remaining cases of foo """ print("Input value must be one of", foo_action_dict.keys()) # Call the approp

[Python-ideas] Re: New clause in FOR and WHILE instead of ELSE

2020-07-14 Thread Steve Barnes
ueError as err: print(err) else: # to try print("No Exception") finally: print("Try Ended") Where the multitude of elses makes my eyes cross. Steve Barnes ___ Python-ideas mailing list -- python-ideas@python.org T

[Python-ideas] Re: Improve handling of Unicode quotes and hyphens

2020-08-05 Thread Steve Barnes
Like it! Sent from Samsung Mobile on O2 Get Outlook for Android<https://aka.ms/ghei36> From: André Roberge Sent: Wednesday, August 5, 2020 7:54:06 PM To: Steve Barnes Cc: python-ideas@python.org Subject: Re: [Python-ideas] Re: Improve handling of Unicode

[Python-ideas] Re: Tracebacks for C code in Python

2020-08-16 Thread Steve Barnes
to raise ticket(s) and possibly pull requires for those error messages to clarify them – I am reasonably sure that the authors of Pandas would welcome constructive feedback but it does need to be specific of course. Steve Barnes ___ Python-ideas mailing

[Python-ideas] Re: Improve error message for trying to import itself

2020-08-22 Thread Steve Barnes
). Might be worth some thinking! Steve Barnes Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 From: Gustav O<mailto:gus...@odinger.se> Sent: 22 August 2020 10:41 To: python-ideas@python.org<mailto:python-ideas@python.org> Subject: [Python-ideas]

[Python-ideas] Option Read/Write Files without discarding comments

2020-08-27 Thread Steve Barnes
get told off for 2 related but divergent elements in one thread! Steve Barnes Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to

[Python-ideas] Re: 'Infinity' constant in Python

2020-09-12 Thread Steve Barnes
Indeed the usual definition of isnan reads: def isnan(x): return x != x ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.p

[Python-ideas] Re: 'Infinity' constant in Python

2020-09-13 Thread Steve Barnes
(overflow at 1e6145) & Octuple (256 bit) overflow at about 1.62e78913 values and in the future 512/1024 bit floats – I love the cross platform support of python. Sorry to be teaching grandma to suck eggs. Steve Barnes ___ Python-ideas mail

[Python-ideas] Re: 'Infinity' constant in Python

2020-09-15 Thread Steve Barnes
o pick a random name) is False (the default) such operations will raise an exception but if it is True INF, -INF or NaN is returned (ideally with some debug output – this would be in the spirit of the IEEE Signalling NaN). Steve Barnes ___ Python-ideas mailing li

[Python-ideas] Re: 'Infinity' constant in Python

2020-09-15 Thread Steve Barnes
>>> 1 / 0 >>> 1 / 0.0 inf Is not true as since python 3 has adopted true division 1/1 returns 1.0 so 1/0 would also return inf. Steve Barnes Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 From: Cade Brown<mailto:brown.c...@gmail.c

[Python-ideas] Suggest mentioning venv --upgrade in installer output & release notes

2020-09-24 Thread Steve Barnes
If you are upgrading a maintenance version (following the major.minor.maintenance naming) of python, e.g. 3.8.5 -> 3.8.6 it is also a good idea to update any 3.8 venvs that you may be using. The venv –upgrade flag is reasonably new and I think that relatively few people will have heard about it

[Python-ideas] Re: Add _KB, _MB, _GB to numeric literals

2020-10-13 Thread Steve Barnes
I would also suggest taking a look at human friendly https://pypi.org/project/humanfriendly/ which does a lot this for you on the user input/output front. Steve Barnes From: malin...@163.com<mailto:malin...@163.com> Sent: 13 October 2020 13:14 To: python-ideas@python.org<mailto:pyt

[Python-ideas] Re: Optimize out setting unused underscored local variables

2020-10-20 Thread Steve Barnes
Of course there is also the problem of detecting any functions assigned to _ or _T that may be called - otherwise there is a risk of breaking the typical gettext usage in I18n! Steve Barnes Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Wind

[Python-ideas] Re: Global flag for whether a module is __main__

2020-11-13 Thread Steve Barnes
useful in trying to resolve circular imports, imports via importlib or exec, etc. The code need would be slightly more complex needing to check the current call stack at the time of import but I don't think that it would be too much overhead. Steve Barnes From: Henshaw, Andy via Python-

[Python-ideas] Re: Making "Any" a builtin

2020-11-29 Thread Steve Barnes
Any only works as an annotation: In [3]: def fn(*argv: Any) -> Any: ...: return argv[0] ...: From: Paul Bryan Sent: 30 November 2020 05:55 To: Inada Naoki ; Abdulla Al Kathiri Cc: python-ideas Subject: [Python-ideas] Re: Making "Any" a builtin pbryan@dynamo:

[Python-ideas] Re: Making "Any" a builtin

2020-11-29 Thread Steve Barnes
it is imported from there as well. From: Paul Bryan Sent: 30 November 2020 06:30 To: Steve Barnes ; Inada Naoki ; Abdulla Al Kathiri Cc: python-ideas Subject: Re: [Python-ideas] Re: Making "Any" a builtin pbryan@dynamo<mailto:pbryan@dynamo>:~$ python3 Python 3.8.6 (default,

[Python-ideas] Re: Making the for statement work better with nested functions

2020-11-29 Thread Steve Barnes
Wouldn't `local` make sense as the opposite of `global` - personally I would rather see that than LET. -Original Message- From: Cameron Simpson Sent: 30 November 2020 07:13 To: sairamkumar2...@gmail.com Cc: python-ideas@python.org Subject: [Python-ideas] Re: Making the for statement wo

[Python-ideas] Re: Make for/while loops nameable.

2020-12-05 Thread Steve Barnes
How about reserving unicode numeric superscript characters 0..9 as label identifiers only to be used for loop & break, etc. Then the example below would become: while¹ not processed(): for x in the_stuff as 37: if all_done(x): break¹ Steve Barnes From: David M

Re: [Python-ideas] install pip packages from Python prompt

2017-10-31 Thread Steve Barnes
On 31/10/2017 18:05, Chris Angelico wrote: > On Wed, Nov 1, 2017 at 2:49 AM, Chris Barker wrote: >> And sure, some of those are completly clueless about what a command line is >> and how to use it, but others DO have an idea about the command line, but >> dont know that: >> > pip install som

Re: [Python-ideas] install pip packages from Python prompt

2017-11-01 Thread Steve Barnes
On 01/11/2017 06:54, Wes Turner wrote: > Suggestions to help to minimize unnecessary logged bandwidth use and > even work with a closed loop LAN: > > This reads from the filesystem: > >     import requests > > This would read from the PyPi service over the network bandwidth: > >    #!pip i

Re: [Python-ideas] install pip packages from Python prompt

2017-11-03 Thread Steve Barnes
> > Reading this I get the impression, and correct me if I'm wrong, that > you've never taught beginners programming. Of course long term (heck in > fact fairly early on) they need to learn these nitty-gritty and > sometimes frustrating lessons, but not in a 2 hour intro to programming > for

Re: [Python-ideas] Proposal to change Python version release cycle

2017-11-04 Thread Steve Barnes
On 04/11/2017 13:29, Antoine Pitrou wrote: > > Hello Wolfgang, > > On Sat, 4 Nov 2017 12:25:57 +0100 (CET) > tds...@mailbox.org wrote: >> Hello, >> >> one of my long standing ideas to improve Python is to adjust the >> release cycle and version number handling. In short, to simplify it. > > Th

[Python-ideas] Possible enhancement to typing

2017-11-05 Thread Steve Barnes
The discussions on moving typing to a standalone library prompted me to take a look at the documentation for typing which in turn lead to an idea that should be reasonably simple to implement but greatly add value to typing for some applications. If a group of iterators were to be added to the

Re: [Python-ideas] Possible enhancement to typing

2017-11-06 Thread Steve Barnes
On 06/11/2017 07:13, Steven D'Aprano wrote: > On Sun, Nov 05, 2017 at 07:18:30PM +0000, Steve Barnes wrote: > >> If a group of iterators were to be added to the typing module it would >> be reasonably simple to automatically add and assert to any decorated >> module

Re: [Python-ideas] A proliferation of (un-)Pythonically programmatic pragmas

2017-11-14 Thread Steve Barnes
On 13/11/2017 19:10, Barry Warsaw wrote: > I love many of the ancillary tools that help improve the quality of my > Python code, including flake8, coverage, and mypy. Each of these > usually produces some great diagnostics, but none of them are perfect, > so they also produce false positives tha

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

2017-11-14 Thread Steve Barnes
>>> We still have to deal with the fact that basically every Unix >>> environment is "advanced" in the above sense (the python2/python3 >>> split). I don't have a solution for that (other than "upgrade to >>> Windows" ;-)). >> >> Provide the "py" command on linux and mac. And make it the default >

Re: [Python-ideas] A proliferation of (un-)Pythonically programmatic pragmas

2017-11-16 Thread Steve Barnes
On 16/11/2017 19:03, Chris Barker wrote: > On Tue, Nov 14, 2017 at 6:14 PM, Steven D'Aprano > wrote: > > > and then, even if you wanted to put it on the previous line, you would't > > have the line-length issue: > > > > # flake8: disable=unused-import

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

2017-11-17 Thread Steve Barnes
On 17/11/2017 09:13, Paul Moore wrote: > On 17 November 2017 at 01:57, Nick Coghlan wrote: >> On 17 November 2017 at 05:15, Chris Barker wrote: >>> >>> On Wed, Nov 15, 2017 at 11:07 AM, Steve Dower >>> wrote: If you write such a PEP, please also research and write up the issues

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Steve Barnes
On 19/11/2017 05:01, Nick Timkovich wrote: > Python does not use U+2010 HYPHEN for the minus operator, it uses the > U+002D (-) HYPHEN-MINUS. > > In some monospace fonts, there is a subtle difference between U+002D, > U+2013 EN DASH, and U+2014 EM DASH, but it's usually hard to tell them > *a

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Steve Barnes
On 19/11/2017 11:20, Stephan Houben wrote: > You think that's bad? > https://github.com/reinderien/mimic/blob/master/README.md > Abandon all hope ye who use Unicode. > > Op 19 nov. 2017 12:06 schreef "Antoine Pitrou" http://www.avg.com ___ Python-idea

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

2017-11-20 Thread Steve Barnes
On 21/11/2017 00:32, Chris Barker wrote: > On Mon, Nov 20, 2017 at 3:24 PM, Paul Moore > wrote: > > On 20 November 2017 at 21:59, Chris Barker > wrote: > > I don't understand any of this enough to have an opinion, so >

  1   2   >