[Python-ideas] Re: Python JIT Compilation Thoughts

2021-01-04 Thread edwin
January 4, 2021 12:55 PM, redrad...@gmail.com wrote: > I have found very nice attempt of JIT for CPython > https://github.com/tonybaloney/Pyjion > > It is working under .NET Runtime, but if it is possible in this project I > believe it is possible in > CPython as well > I suggest that you fork

[Python-ideas] Re: Typed Python execution mode

2020-12-10 Thread edwin
December 10, 2020 4:18 PM, redrad...@gmail.com wrote: > I do not want to make type-checker a part of CPython, I just what options > that will allow to run > python with first some type-checker ... > For example, you would be able to set default python module for type-checking > and if there is n

[Python-ideas] Re: Getting rid of FOR loops and simplifying cicular convolutions with Circular Indexing

2020-11-26 Thread Edwin Zimmerman
< 100: raise IndexError('list index out of range') else: my_list[99] No thanks.  Modifying the builtin list type for circular indexing is an "over my dead body" situation. --Edwin On 11/26/2020 3:20 AM, Mathew M. Noel via Python-ideas wrote: > > Circular inde

[Python-ideas] Re: Circular Indexing

2020-11-24 Thread edwin
t of range" errors can often be indicators of a bug elsewhere, and this would cause those bugs to silently pass. --Edwin ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://m

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-21 Thread Edwin Zimmerman
ingle exe file is easier at all levels than distributing a complete install of Python. --Edwin ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman

[Python-ideas] Re: Weakrefs for lru_cache?

2020-10-15 Thread edwin
That would satisfy my concerns. October 15, 2020 2:12 PM, "Ram Rachum" mailto:r...@rachum.com?to=%22Ram%20Rachum%22%20)> wrote: Your use case is valid, there are times in which I'd like a strong reference to be kept. But there are also lots of times I want it to not be kept. Then I would offer t

[Python-ideas] Weakrefs for lru_cache?

2020-10-15 Thread edwin
Usually when I use lru_cache I don't want items to randomly disappearing from the cache. Just because a key isn't referenced anywhere else doesn't mean that I want it to automatically disappear. That is the whole point. Take this example: @lru_cache def expensive_function(a,b,c): return a**b**

[Python-ideas] Re: Naming Accepted PEPs as PAPs

2020-09-21 Thread edwin
not think your idea is a good one. Please stop being so dismissive of others' comments. It does not endear you to them. --Edwin ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-l

[Python-ideas] Re: f-strings as assignment targets

2020-09-17 Thread Edwin Zimmerman
27;t see > what you're complaining at. > > ChrisA I don't either.  This could be incredibly useful for simple string extraction.  Obviously, there are situations where regex is a much better option, but why object to a simple option for simple problems? --Edwin _

[Python-ideas] Re: A shortcut to load a JSON file into a dict : json.loadf

2020-09-12 Thread Edwin Zimmerman
ou need is an IDE feature that creates and merges a pull request.  Just think how easy that would make it for Python to be everything to everyone. --Edwin ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-idea

[Python-ideas] Re: still more use for pathlib.Path ....

2020-08-20 Thread Edwin Zimmerman
What about code that depends on __file__ to add installation dependent import paths to sys.path?  I have written code like that myself, and I've seen it elsewhere too. --Edwin On 8/20/2020 9:06 PM, Christopher Barker wrote: > I really like pathlib. > > But for a while is was

[Python-ideas] Re: Changing item dunder method signatures to utilize positional arguments (open thread)

2020-08-08 Thread Edwin Zimmerman
On 8/7/2020 10:47 PM, Ricky Teachey wrote: > On Fri, Aug 7, 2020 at 9:25 PM Edwin Zimmerman <mailto:ed...@211mainstreet.net>> wrote: > > On 8/7/2020 8:28 PM, Greg Ewing wrote: > >  I don't think anyone has the appetite for a Python 4 any > > time

[Python-ideas] Re: Changing item dunder method signatures to utilize positional arguments (open thread)

2020-08-07 Thread Edwin Zimmerman
n for proposing major breaking changes.  Python 3 works quite well, I think.  Non-breaking, incremental changes suite me much better that large breaking ones.  I have better things to do with my time than complete software rewrites of all the software projects I work on. --Edwin ___

[Python-ideas] Re: Pickle security improvements

2020-07-15 Thread Edwin Zimmerman
secure. That said, I agree with the idea of giving users an easier way to control what pickle does. I think that any such modifications should continue to make clear that pickle has not magically become "safe". --Edwin ___ Python-ideas m

[Python-ideas] Re: Pickle security improvements

2020-07-13 Thread Edwin Zimmerman
I would have interest in it. --Edwin I'm no security expert, but we've got a big pile of serialization code that is kind of like JSON-pickly, but it will only deserialize known objects. it's a bit of pain to declare what you want to work with, but it seems safer.

[Python-ideas] Re: Pickle security improvements

2020-07-13 Thread Edwin Zimmerman
On 7/11/2020 11:17 PM, Greg Ewing wrote: > On 12/07/20 1:01 pm, Edwin Zimmerman wrote: >> As I see it, the unsafe callables (eval, exec, os.system, etc) are generally >> functions, and safe ones(int, list, dict) are generally classes, though >> there certainly would be

[Python-ideas] Re: Pickle security improvements

2020-07-11 Thread Edwin Zimmerman
incremental step towards better security. --Edwin On 7/11/2020 8:45 PM, Greg Ewing wrote: > On 12/07/20 8:54 am, Wes Turner wrote: >> Would it be feasible to just NOP callables when safe=True? > > This would break pickle, because calling constructors is > the way many objects are unpic

[Python-ideas] Re: Pickle security improvements

2020-07-11 Thread Edwin Zimmerman
was a MemoryError traceback. Even with all the improvements pickle has seen, I think it would be unwise to imply (via pickle module names or flags) that pickle is "safe". --Edwin On 7/11/2020 1:31 PM, Wes Turner wrote: > Would this accomplish something like: > > pickle.lo

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

2020-06-29 Thread Edwin Zimmerman
ussions on racism.  I haven't seen an comments yet that agreed with the OP that PEP 8 authors wrote anything racist.  If fact, I suspect the authors would vehemently deny such an accusation.  Please, can we just drop this discussion? --Edwin ___

[Python-ideas] Re: Modularize Python library

2020-06-16 Thread Edwin Zimmerman
way everyone could have it their way. --Edwin On 6/16/2020 6:51 AM, Stéfane Fermigier wrote: > It has also been discussed that some people can't rely on anything outside > the standard packages, due to the constraints of their company or

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

2020-06-09 Thread Edwin Zimmerman
On 6/9/2020 9:21 PM, Jonathan Goble wrote: > On Tue, Jun 9, 2020, 8:47 PM Edwin Zimmerman <mailto:ed...@211mainstreet.net>> wrote: > > Wouldn't this break backwards compatibility with everything the whole way > back to 3.0?  I fear a future with where I have

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

2020-06-09 Thread Edwin Zimmerman
Wouldn't this break backwards compatibility with everything the whole way back to 3.0?  I fear a future with where I have to run a 2to3 type tool on third-party dependencies just to get them to work with my 3.7 code base. --Edwin On 6/9/2020 8:06 PM, Guido van Rossum wrote: > In Python

[Python-ideas] Re: Python GIL Thoughts

2020-05-25 Thread Edwin Zimmerman
On 5/25/2020 8:29 AM, redrad...@gmail.com wrote: > Edwin Zimmerman wrote: >> On Monday, May 25, 2020 redrad...@gmail.com [mailto:redrad...@gmail.com] >> wrote >>> Edwin Zimmerman wrote: >>> On 5/25/2020 5:56 AM, redrad...@gmail.com >>> wrote: >>>

[Python-ideas] Re: Python GIL Thoughts

2020-05-25 Thread Edwin Zimmerman
On Monday, May 25, 2020 redrad...@gmail.com [mailto:redrad...@gmail.com] wrote > Edwin Zimmerman wrote: > > On 5/25/2020 5:56 AM, redrad...@gmail.com wrote: > > > Edwin Zimmerman wrote: > > Sub-interpreters are a work in progress. The API is not anywhere near >

[Python-ideas] Re: Python GIL Thoughts

2020-05-25 Thread Edwin Zimmerman
On 5/25/2020 5:56 AM, redrad...@gmail.com wrote: >>> Edwin Zimmerman wrote: > Only if your workload is CPU bound. Python optimizes IO bound workload > performance by > releasing the GIL while doing IO. Green threads generally do not offer this > option. > > Real thre

[Python-ideas] Re: Python GIL Thoughts

2020-05-23 Thread Edwin Zimmerman
io` ... But we can to > change underling `api` from `sync io` to `async io` !! > User will notice nothing, but performance will be increased mush more !! Only if your workload is CPU bound.  Python optimizes IO bound workload performance by releasing the GIL while doing IO.  Green threads genera

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-23 Thread Edwin Zimmerman
e on this email (Result:  "I'd like to suggest allowing unicode as an alternative to 'dash'").  There might be other screen readers that work better, but I agree that this would increase inaccessibility. --Edwin ___ Python-idea

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Edwin Zimmerman
l already. What if I want to use a font in my editor that doesn't support →?  Does that mean that I won't be able to edit some random bit of code I download? --Edwin ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Edwin Zimmerman
en as >= in Python). And maybe other > > national or domain specific mathematical symbols. Imagine confusion when > > >=, ≥, ⩾ and ⊃ are occurred in the same program. > > Hey, we don't have to stop there. There are lots of Unicode characters Python could accept to make it

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Edwin Zimmerman
?? It wouldn't. No matter how slick of a Unicode operator insertion setup you have, it still is quicker and easier to type ->. I fail to understand how suggesting that all new python programmers use a slower, more complex entry method can be perceived as m

[Python-ideas] Re: extended for-else, extended continue, and a rant about zip()

2020-04-28 Thread Edwin Zimmerman
On April 28, 2020 9:38 AM Soni L. wrote: > On 2020-04-28 7:50 a.m., Edwin Zimmerman wrote: > > On 4/27/2020 11:47 PM, Soni L. wrote: > > [snip] > > > tbh my particular case doesn't make a ton of practical sense. I have > > > config files and there may be

[Python-ideas] Re: extended for-else, extended continue, and a rant about zip()

2020-04-28 Thread Edwin Zimmerman
On 4/27/2020 11:47 PM, Soni L. wrote: [snip] > tbh my particular case doesn't make a ton of practical sense. I have config > files and there may be errors opening or deserializing them, and I have a > system to manage configs and overrides. which means you can have multiple > config files, and y

[Python-ideas] Re: extended for-else, extended continue, and a rant about zip()

2020-04-27 Thread Edwin Zimmerman
I doubt that you will find many people on this list who are willing to do your homework for you.  It will be very hard to convince most of the people on this list if the only reason you can give is "I think this would look great".  Great ideas are based on real needs, not on flights of fancy. O