[Python-ideas] Re: Fwd: Re: Experimenting with dict performance, and an immutable dict

2020-07-28 Thread Brett Cannon
On Sat, Jul 25, 2020 at 12:58 PM Guido van Rossum wrote: > On Sat, Jul 25, 2020 at 12:45 PM Marco Sulla > wrote: > >> I also remembered another possible use-case: kwargs in CPython. In C >> code, kwargs are PyDictObjects. I suppose they are usually not modified; if >> so, fdict could be used,

[Python-ideas] Official joint communication from the Python Steering Council, PSF Board of Directors, and PSF Conduct WG

2020-07-20 Thread Brett Cannon
[This has been sent to python-committers, python-dev, and python-ideas] Recently, a series of discussions on this mailing list resulted in behavior that did not live up to the standards of the Python Community. The PSF Board of Directors, Python Steering Council, and the PSF Conduct Working Group

[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-17 Thread Brett Cannon
On Thu, Jul 16, 2020 at 11:52 AM wrote: > CPython is portable but due to integrated standard library (builtin > functionality) it is hard to evolve it, How so? The stdlib is just a collection of packages we happen to ship with Python. Think of it as if we ship blessed packages from PyPI with

[Python-ideas] Re: Allowing -b (BytesWarning) to be activated in other ways

2020-07-16 Thread Brett Cannon
I honestly wouldn't expect that flag to last forever because it exists purely to help with Python 2 -> 3 transitions. Since it fundamentally changes how things like comparison and `str()` work it isn't something to flip on needlessly and you would be better off using a type checker or linter to

[Python-ideas] Re: Thoughts about Fast Python Engine and Python EveryWhere

2020-07-16 Thread Brett Cannon
CPython is already very portable thanks to it being implemented in C. I don't see, though, how a lack of stdlib for JavaScript makes it fast? Unless you're saying the Python core team should drop the stdlib so it has more time to focus on the CPython interpreter itself? On Thu, Jul 16, 2020 at

[Python-ideas] Re: Python GIL Thoughts

2020-06-30 Thread Brett Cannon
On Tue, Jun 30, 2020 at 5:26 AM wrote: > Brett Cannon wrote: > > It's a discussion issue. PEP 554 is trying to focus on the API of > > subinterpreters and doesn't want to distract from that by bringing the > GIL > > into it. > > That being said, the general expe

[Python-ideas] Re: Python GIL Thoughts

2020-06-29 Thread Brett Cannon
It's a discussion issue. PEP 554 is trying to focus on the API of subinterpreters and doesn't want to distract from that by bringing the GIL into it. That being said, the general expectation from everyone involved is there will be a perl-interpreter GIL. On Sat, Jun 27, 2020 at 10:31 AM Denis

[Python-ideas] Re: Python JIT Compilation Thoughts

2020-06-29 Thread Brett Cannon
On Mon, Jun 29, 2020 at 2:50 AM wrote: > Ned Batchelder wrote: > > On 5/25/20 6:02 AM, redrad...@gmail.com wrote: > > > Hi all, > > > I do not know maybe it was already discussed ... > > > It's been extensively discussed and attempted. > > > but the toolchain like LLVM is very mature and it can

[Python-ideas] Re: Access (ordered) dict by index; insert slice

2020-06-26 Thread Brett Cannon
Why can't you do `tuple(dict.items())` to get your indexable pairs? Otherwise there are no plans as you would have to introduce a new method as you can't assume e.g. `0` is being used as a dictionary key. On Fri, Jun 26, 2020 at 10:32 AM Hans Ginzel wrote: > Date: Fri, 26 Jun 2020 18:47:44

[Python-ideas] Re: giving set.add a return value

2020-06-25 Thread Brett Cannon
On Thu, Jun 25, 2020 at 10:10 AM Ben Avrahami wrote: > On Thu, Jun 25, 2020 at 7:55 PM Christopher Barker > wrote: > >> On Thu, Jun 25, 2020 at 9:02 AM Steele Farnsworth >> wrote: >> indeed -- and that is pretty darn baked in to Python, so I don't think >> it's going to change. >> > 30 years

[Python-ideas] Re: String module name

2020-06-16 Thread Brett Cannon
You can do this via a function call; it does not require syntax support. And Deno has specific needs as they also need to fetch type information, so being able to parse out the URLs systematically has special meaning to deno. On Tue, Jun 16, 2020 at 2:06 AM wrote: > Yeah, but it still desire

[Python-ideas] Re: await by default

2020-06-12 Thread Brett Cannon
That switch means other things can now occur. You have to know that when you yield your coroutine other things may mutate state, which means you now need to check that no previous assumptions have become invalid. Event loops typically being single-threaded means you don't need to lock and worry

[Python-ideas] Re: await by default

2020-06-12 Thread Brett Cannon
The use of `await` is on purpose to signal to you as a developer that the event loop may very well pause at that point and context switch to another coroutine. Take that away and you lose that signal. You also would never know from your code whether you need to have an event loop running or not to

[Python-ideas] Re: url imports

2020-06-10 Thread Brett Cannon
Do note that is not as easy as it seems as you would have to figure out how to manage dependencies appropriately, especially if you are going to support using different versions at the same time. Otherwise you could write your own function today to see if you can get a proof-of-concept working as

[Python-ideas] Re: Automatic notification when your PR test fails or succeeds

2020-06-05 Thread Brett Cannon
This sort of question belongs on core-workflow. BTW, please don't open draft PRs for CPython. They are very distracting. It's best to only send a PR to CPython when you're ready to review it. Otherwise you should be able to check the CI via GitHub Actions on your own fork before sending it out

[Python-ideas] Re: Python JIT Compilation Thoughts

2020-05-26 Thread Brett Cannon
It was Unladen Swallow that used LLVM, but it was early on in LLVM's JIT life and they unfortunately had to spend a bunch of time fixing LLVM which ate up the time they had to do the experiment. On Mon, May 25, 2020 at 2:36 PM Christopher Barker wrote: > On Mon, May 25, 2020 at 3:05 AM wrote:

[Python-ideas] Re: Ensuring asserts are always on in a file

2020-05-19 Thread Brett Cannon
The closest you may ever get to something like this is a clean separation of -O flags instead of the current -O/-OO options. That way you can flip on everything *but* assertion removal. But a per-file directive I don't see happening, and even the flag separation has never caught on enough for

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

2020-05-19 Thread Brett Cannon
I'm going to ask that people please try to keep this thread on-topic to the question of using Unicode characters directly for things that we currently use two ASCII characters to represent. Other ideas that spring up from this question are totally welcome to be done as new threads of discussion.

[Python-ideas] Re: Keyword arguments self-assignment

2020-04-17 Thread Brett Cannon
On Fri, Apr 17, 2020 at 10:29 AM Alex Hall wrote: > Perhaps an easier next step would be to get better data about people's > opinions with a simple poll? Is there a standard way to vote on things in > this list? > No, but if you want to create a poll I would strongly advise that you create a

[Python-ideas] Re: Keyword arguments self-assignment

2020-04-16 Thread Brett Cannon
On Thu, Apr 16, 2020 at 10:02 AM wrote: > @ > > > Do any other languages already have this feature? > > JavaScript ES6 has similar feature: > > ```javascript > x = 1 > y = 2 > do_something({ x, y }) > ``` > Rust also has a similar feature when instantiating structs which are always

[Python-ideas] Re: Should dataclass init call super?

2020-04-15 Thread Brett Cannon
On Wed, Apr 15, 2020 at 8:45 AM Christopher Barker wrote: > > you'd just add *args and **kwargs to the init signature and call > super().__init__(*args, **kwargs). > >> >> Which is what the OP is after. >> > > Hmm, makes me wonder if there should be an option to define a __pre_init__ > method. >

[Python-ideas] Re: Live variable analysis -> earlier release?

2020-04-08 Thread Brett Cannon
On Wed, Apr 8, 2020 at 10:23 AM Guido van Rossum wrote: > On Wed, Apr 8, 2020 at 10:05 AM Alex Hall wrote: > >> This would break uses of locals(), e.g. >> > > Hm, okay, so suppose the code analysis was good enough to recognize most > un-obfuscated uses of locals(), exec() and eval() (and

[Python-ideas] Re: Changing Package Representation On Shell

2020-04-02 Thread Brett Cannon
On Thu, Apr 2, 2020 at 8:22 AM Abdur-Rahmaan Janhangeer < arj.pyt...@gmail.com> wrote: > Thanks for the snippet, > > Was wondering if given as a package option, > we might display the module's help info. > That's what help() is for. The __repr__ is meant to help during development with some

[Python-ideas] Re: Explicitly defining a string buffer object (aka StringIO += operator)

2020-03-30 Thread Brett Cannon
On Sun, Mar 29, 2020 at 10:58 AM Paul Sokolovsky wrote: > [SNIP] > > 1. Succumb to applying the same mis-optimization for string type as > CPython3. (With the understanding that for speed-optimized projects, > implementing mis-optimizations will eat into performance budget, and > for

[Python-ideas] Re: About python3 on windows

2020-03-26 Thread Brett Cannon
On Wed, Mar 25, 2020 at 9:57 AM Paul Moore wrote: > On Wed, 25 Mar 2020 at 16:10, Eryk Sun wrote: > > > The py launcher's "env" command searches PATH for anything from > > "python" to "notepad" -- but not for a versioned Python command such > > as "python3" or "python2". It always uses a

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Brett Cannon
On Mon, Mar 23, 2020 at 3:47 PM Mike Miller wrote: > > On 2020-03-23 10:59, Frédéric De Jaeger wrote: > > Hi all, > > > > There is a recurring problem > > Yep, that's a problem. I've built up a habit on Ubuntu where I type > python3 a > number of times a day, honed over several years. So far

[Python-ideas] Re: python-ideas@python.org post from python-id...@marco.sulla.e4ward.com requires approval

2020-03-13 Thread Brett Cannon via Python-ideas
These are coming in fine because they are not handled by Mailman's filtering rules. And the reason for the holds is they are being flagged for " Message has implicit destination". On Fri, Mar 13, 2020 at 8:06 AM Marco Sulla < python-id...@marco.sulla.e4ward.com> wrote: > Well, probably it

[Python-ideas] Re: Mailman 3 monthly summaries broken for Python-ideas

2020-03-09 Thread Brett Cannon
Guido is correct as we don't directly control the software. It's probably a bug with Mailman 3/Hyperkitty. On Sun, Mar 8, 2020 at 2:35 PM Guido van Rossum wrote: > I think this is more of an issue to bring up with postmas...@python.org. > > On Sun, Mar 8, 2020 at 7:41 AM André Roberge > wrote:

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

2020-03-05 Thread Brett Cannon
On Thu, Mar 5, 2020 at 7:02 AM Steven D'Aprano wrote: > On Thu, Mar 05, 2020 at 12:39:38PM +, Steve Barnes wrote: > > > Hmm, is there a PEP regarding Decimal literals? > > No. > > > I couldn't find one, > > although there is PEP 240 regarding rational literals. Maybe it's time > > to write

[Python-ideas] Re: Communication on mailing lists [was: Add a __valid_getitem_requests__ protocol]

2020-02-27 Thread Brett Cannon
Rhodri James wrote: > I did not intend meanness. I absolutely did intend rebuke; at the time > Soni was one poorly worded post away from my killfile, and I had > seriously considered reporting several previous posts for CoC > violations. The only reason I didn't was that I was under the >

[Python-ideas] Re: `raise as` to raise with current exception as cause

2020-02-07 Thread Brett Cannon
On Fri, Feb 7, 2020 at 7:56 AM Ethan Furman wrote: > On 02/07/2020 07:33 AM, Serhiy Storchaka wrote: > > 07.02.20 16:28, Ram Rachum пише: > >> The idea is to add `raise as` syntax, that raises an exception while > setting the currently caught exception to be the cause. It'll look like > this: >

[Python-ideas] Re: Allow spaces between string prefix and the string literal

2020-01-30 Thread Brett Cannon
The problem is that's ambiguous to the grammar whether you truly mean 'f' as a prefix or 'f' as a variable and just happened to type something wrong. And then debugging that would be horrible. So even if the grammar to support it, I'm -1 on the idea. On Wed, Jan 29, 2020 at 1:41 PM Mikhail V

[Python-ideas] Re: Is the deployment standard for WSGI ready?

2020-01-28 Thread Brett Cannon
The PEP index can be found at https://www.python.org/dev/peps/ and there isn't any PEP on this. But honestly, I don't think this sort of thing should be a PEP. Look at ASGI and how that isn't a PEP and still manages to exist. Since this isn't a language-related or package-related thing I don't

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

2020-01-11 Thread Brett Cannon
On Fri, Jan 10, 2020 at 10:24 PM Steve Barnes wrote: > > > -Original Message- > From: Steven D'Aprano > Sent: 11 January 2020 04:39 > To: python-ideas@python.org > Subject: [Python-ideas] Re: python -m quality of life improvements > > On Fri, Jan 10, 2020 at 11:53:10PM -0300, Soni L.

[Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Brett Cannon
On Wed, Jan 8, 2020 at 1:09 AM Abdur-Rahmaan Janhangeer < arj.pyt...@gmail.com> wrote: > > Yours, > > Abdur-Rahmaan Janhangeer > pythonmembers.club | github > Mauritius > > > On Wed, Jan 8, 2020 at 1:32 AM Brett Cannon wrote: > > > > > >

[Python-ideas] Re: Enhancing Zipapp

2020-01-07 Thread Brett Cannon
Thanks for the ideas, Abdur-Rahmaan! Some feedback below. On Mon, Jan 6, 2020 at 11:35 AM Abdur-Rahmaan Janhangeer < arj.pyt...@gmail.com> wrote: > Note: draft simplified > > Abstract > == > > This extracts aims at proposing enhancements to the generated zipapp > executable > > Rationale >

[Python-ideas] Re: Argumenting in favor of first()

2019-12-12 Thread Brett Cannon
On Wed, Dec 11, 2019 at 9:48 PM Tim Peters wrote: > [Tim] > >> Every suggestion here so far has satisfied that, if S is a non-empty > set, > >> > >> assert next(iter(S)) is first(S) > >> > >> succeeds. That is, `first()` is _defined_ by reference to iteration > >> order. It's "the first"

[Python-ideas] Re: Argumenting in favor of first()

2019-12-11 Thread Brett Cannon
On Tue, Dec 10, 2019 at 1:50 PM Tim Peters wrote: > [Brett Cannon ] > > Thinking out loud here... > > > > What idiom are we trying to replace with one that's more obviously and > whose > > semantics are easy to grasp? > > For me, most of the time, it's to hav

[Python-ideas] Re: Argumenting in favor of first()

2019-12-10 Thread Brett Cannon
On Mon, Dec 9, 2019 at 9:43 PM Tim Peters wrote: > [Guido] > > The argument that first(it) and next(it) "look the same" doesn't convince > > me; > > I'm sorry - I guess then I have absolutely no idea what you were > trying to say, and read it completely wrong. > > > if these look the same then

[Python-ideas] Re: Argumenting in favor of first()

2019-12-09 Thread Brett Cannon
On Mon, Dec 9, 2019 at 10:39 AM Tim Peters wrote: > [Steven D'Aprano ] > > What do you think of my suggestion that we promote the itertools recipe > > "take" into a function? > > > > > https://mail.python.org/archives/list/python-ideas@python.org/message/O5RYM6ZDXEB3OAQT75IADT4YLXE25HTT/ > >

[Python-ideas] Re: Argumenting in favor of first()

2019-12-09 Thread Brett Cannon
On Mon, Dec 9, 2019 at 10:03 AM Tim Peters wrote: > [Andrew Barnert ] > > Didn’t PyPy already make the fix years ago of rewriting all of itertools > > (for both 2.7 and 3.3 or whenever) as “Python builtins” in the underlying > > namespace? > > I don't know. > > > Also, even if I’m remembering

[Python-ideas] Re: Allow user extensions to operators [related to: Moving PEP 584 forward (dict + and += operators)]

2019-12-05 Thread Brett Cannon
on the idea regardless of the performance. :) > > On Wed, Dec 4, 2019 at 12:26 Brett Cannon wrote: > >> >> >> On Tue, Dec 3, 2019 at 5:58 PM Random832 wrote: >> >>> On Tue, Dec 3, 2019, at 13:43, Brett Cannon wrote: >>> > -1 from me. I can

[Python-ideas] Re: Allow user extensions to operators [related to: Moving PEP 584 forward (dict + and += operators)]

2019-12-04 Thread Brett Cannon
On Tue, Dec 3, 2019 at 5:58 PM Random832 wrote: > On Tue, Dec 3, 2019, at 13:43, Brett Cannon wrote: > > -1 from me. I can see someone not realizing an operator was changed, > > assuming it's standard semantics, and then having things break subtly. > > And debugging this w

[Python-ideas] Re: Moving PEP 584 forward (dict + and += operators)

2019-12-03 Thread Brett Cannon
On Tue, Dec 3, 2019 at 2:00 AM Serhiy Storchaka wrote: > [SNIP] > > ## What about performance? > > It should be mentioned in the PEP that `dict1 | dict2 | dict3` is less > efficient than `{**dict1, **dict2, **dict3}`. > ... in CPython, but is it guaranteed to be faster in e.g. PyPy? We should

[Python-ideas] Re: Allow user extensions to operators [related to: Moving PEP 584 forward (dict + and += operators)]

2019-12-03 Thread Brett Cannon
On Tue, Dec 3, 2019 at 8:29 AM Random832 wrote: > What if there was a general mechanism to allow operators to be implemented > by user code that does not belong to the class? > > If the name [e.g.] __operatorhook_or__ is defined anywhere in a module, > within that module all calls to that

[Python-ideas] Re: Adding fixed-point decimals as an option to replace floating-point

2019-11-14 Thread Brett Cannon
On Thu, Nov 14, 2019 at 9:04 AM wrote: > Does decimal make this: > 4.1 + 0.1 > produce 4.2 instead of 4.18? > Yes, see https://docs.python.org/3/library/decimal.html#module-decimal. > ___ > Python-ideas mailing list --

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

2019-11-13 Thread Brett Cannon
Correct, bad typo. :) On Tue, Nov 12, 2019 at 2:31 PM Eric V. Smith wrote: > > *PEP 328 doesn’t seem to mention any of the names detailed below.* >> > > I strongly advise reading PEPs as documentation once their work has > landed. At that point they are mostly historical documents and will not

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

2019-11-12 Thread Brett Cannon
On Fri, Nov 8, 2019 at 11:07 AM Ricky Teachey wrote: > > >> __import__ already has a 'level' argument. >> > > doh! maybe "context" is better, then. > > >> Not without frame inspection to know what import statements are in the >> context manager's block. >> >> > I don't doubt you know what you're

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

2019-11-12 Thread Brett Cannon
On Sat, Nov 9, 2019 at 10:57 AM Steve Barnes wrote: > > > > > *From:* Brett Cannon > *Sent:* 08 November 2019 18:10 > *To:* Ricky Teachey > *Cc:* Dan Sommers <2qdxy4rzwzuui...@potatochowder.com>; python-ideas < > python-ideas@python.org> > *S

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

2019-11-08 Thread Brett Cannon
On Fri, Nov 8, 2019 at 10:01 AM Ricky Teachey wrote: > throwing this idea out there, no idea if it is practical but it might be > pretty nice/easily understood syntax. > > could a context manager be created such that anything imported under it is > guaranteed to be imported from the standard

[Python-ideas] Re: add a .with_stem() method to pathlib objects

2019-10-30 Thread Brett Cannon
On Tue, Oct 29, 2019 at 12:29 PM Ricky Teachey wrote: > Cool. Sounds like >> >> def with_stem(self, new_stem): >> self.with_name(new_stem + self.suffix) >> >> is the preferred solution. I agree it seems like the right option. >> >> As I said, I don't think it's a big deal either way. A

[Python-ideas] Re: foo.setParseAction(lambda a, b, c: raise FuckPython(":("))

2019-10-28 Thread Brett Cannon
On Sun, Oct 27, 2019 at 6:58 AM Soni L. wrote: > foo.setParseAction(lambda a, b, c: raise FuckPython(":(")) is invalid > syntax, which makes pyparsing useless. > Insulting the project that you're trying to get help with is unnecessary to get your point across. Consider this a warning that such

[Python-ideas] Re: RFC: PEP xxx: Python Compatibility Version

2019-10-18 Thread Brett Cannon
On Thu, Oct 17, 2019 at 7:39 PM Ethan Furman wrote: > On 10/17/2019 06:02 PM, Victor Stinner wrote: > > > I propose the following PEP to add > > sys.set_python_compat_version(version) to introduce a partial > > compatibility with Python 3.8 in the next Python 3.9 version. > > -1 > -1 from me as

[Python-ideas] Quick notice about an update to the Code of Conduct

2019-10-02 Thread Brett Cannon
We just wanted to quickly let people know that the PSF Code of Conduct recently got an update: https://pyfound.blogspot.com/2019/09/the-python-software-foundation-has_24.html. Since this list falls under the PSF CoC these changes apply here. In terms of reporting CoC violations, you can continue

[Python-ideas] Re: Proposal: Use "for x = value" to assign in scope

2019-08-09 Thread Brett Cannon
On Fri, Aug 9, 2019 at 9:03 AM Peter O'Connor wrote: > Alright hear me out here: > > I've often found that it would be useful for the following type of > expression to be condensed to a one-liner: > > def running_average(x_seq): > averages = [] > avg = 0 > for t, x in

[Python-ideas] Re: Exceptions with Message Templates

2019-08-09 Thread Brett Cannon
dience and/or could ever be accepted, as well as to > refine the idea and implementation. > > On Thu, Aug 8, 2019 at 2:03 PM Brett Cannon wrote: > >> Three things. One, this isn't backwards-compatible as you are not passing >> any details down into Exception.__init__() to make s

[Python-ideas] Re: Exceptions with Message Templates

2019-08-09 Thread Brett Cannon
On Thu, Aug 8, 2019 at 5:24 PM Sebastian Kreft wrote: > > > On Thu, Aug 8, 2019 at 7:09 PM Andrew Barnert via Python-ideas < > python-ideas@python.org> wrote: > >> On Aug 8, 2019, at 15:01, Ryan Fox wrote: >> >> I don't see why you would want to access arguments by their position. >> >> >>

[Python-ideas] Re: Exceptions with Message Templates

2019-08-08 Thread Brett Cannon
Three things. One, this isn't backwards-compatible as you are not passing any details down into Exception.__init__() to make sure that BaseException.args gets populated. Two, you can simplify your code by using str.format_map() instead of the string module. Three, I don't see enough overhead

[Python-ideas] Re: For-expression/throwaway comprehension

2019-08-01 Thread Brett Cannon
On Thu, Aug 1, 2019 at 10:49 AM Eli Berkowitz wrote: > In terms of an argument for why it should be included, for most Python > users the itertools recipes remain unseen. I consider myself relatively > fluent in Python (not compared to y'all of course) and hadn't seen them > until I started this

[Python-ideas] Re: support toml for pyproject support

2019-07-29 Thread Brett Cannon
On Mon, Jul 29, 2019 at 12:57 AM Sardorbek Imomaliev < sardorbek.imomal...@gmail.com> wrote: > Thanks, Brett. You've brought good points. And I wasn't necessarily > advocating about adding TOML support to stdlib, actually it was more about > having a defacto library for TOML parsing. Currently

[Python-ideas] Re: For-expression/throwaway comprehension

2019-07-26 Thread Brett Cannon
On Fri, Jul 26, 2019 at 6:57 AM Eli Berkowitz wrote: > By #1 "should" be a 1-liner, I mean that I think a reasonable goal is to > have a good syntax for this operation to be one line. > > And for #3 I'm basing it also off Pep 8: "Compound statements (multiple > statements on the same line) are

[Python-ideas] Re: support toml for pyproject support

2019-07-26 Thread Brett Cannon
On Fri, Jul 26, 2019 at 5:15 AM Sardorbek Imomaliev < sardorbek.imomal...@gmail.com> wrote: > Hello everyone, it has been almost a year after this issue was brought up. > I suggest starting discussion on this again. I created an issue in > python/peps repo

[Python-ideas] Re: PEP's shouldn't require a sponsor

2019-07-25 Thread Brett Cannon
On Thu, Jul 25, 2019 at 5:21 AM Rhodri James wrote: > On 25/07/2019 13:14, Batuhan Taskaya wrote: > > Why do i need to convince a core developer for my PEP? AFAIK the steering > > council can include non core developers (i know it isn't that current > case > > but for the future this is

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

2019-07-10 Thread Brett Cannon
On Wed, Jul 10, 2019 at 1:58 PM Brendan Barnwell wrote: > On 2019-07-09 23:23, Alex Walters wrote: > > I have made this suggestion in the past. The response then was that > there > > is no metadata in the windows install that includes if the release is > > development or stable (that

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

2019-07-10 Thread Brett Cannon
I'll also mention it's covered in the official docs at https://docs.python.org/3/using/windows.html#launcher. On Wed, Jul 10, 2019 at 2:04 PM Brett Cannon wrote: > > > On Wed, Jul 10, 2019 at 1:13 PM Steve Barnes > wrote: > >> Brett, >> >> >> >>

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

2019-07-10 Thread Brett Cannon
/HELP.txt. > > > 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 > > > > Based o

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

2019-07-10 Thread Brett Cannon
Based on the various responses I've seen, one thing I want to make very clear is the launcher needs to be *fast*. That means no executing Python code, minimizing stat calls, etc. Also be aware that I'm developing a launcher for UNIX, which puts its own twist on this whole situation as there's no

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

2019-07-09 Thread Brett Cannon
On Mon, Jul 8, 2019 at 10:39 PM Steve Barnes wrote: > Currently the py[w] command will launch the latest python by default > however I feel that this discourages the testing of pre-releases & release > candidates as once they are installed they will become the default. What I > would like is for

[Python-ideas] Re: Sildenafil is the best medicine to cure ED issues

2019-07-08 Thread Brett Cannon
I've marked their emails to be automatically discarded. On Sat, Jul 6, 2019 at 6:50 AM Chris Angelico wrote: > On Sat, Jul 6, 2019 at 11:37 PM David Mertz wrote: > > > > Seems useful, but it probably needs a PEP. :-) > > Please don't quote spam, but if you must, do please delete the links >

[Python-ideas] Re: venv.EnvBuilder environmental variable hooks

2019-06-18 Thread Brett Cannon
Just an FYI that I actually plan to try and make the activation scripts (at least under PowerShell) completely static so they can be signed. On Tue, Jun 18, 2019 at 3:31 PM Caleb Donovick wrote: > Currently EnvBuilder allows for a number of customizations of virtual > environments, changing

[Python-ideas] Re: Comparison operator support (>= and <=) for type

2019-06-14 Thread Brett Cannon
I think the logic breaks down with multiple inheritance. If you make C(A, B), then you can say C > A and C > B, but then you can't say A > B or A < B which breaks sorting. If you want to know if a B inherits from Base, then I think `Base in B.mro()` will cover that just as succinctly. And if you

[Python-ideas] python-ideas is now running on Mailman 3

2019-06-05 Thread Brett Cannon
https://mail.python.org/mailman3/lists/python-ideas.python.org/ ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s Code of Conduct:

Re: [Python-ideas] Making code objects filename an absolute path.

2019-05-25 Thread Brett Cannon
o see if there was consensus. Plus tests are typically requires first regardless. -Brett I'm > posting it here because i need to know do i have to write a pep or just > give bpo link to __future__ page. > > On Fri, May 24, 2019 at 10:34 PM Brett Cannon wrote: > >> >> >> O

Re: [Python-ideas] Making code objects filename an absolute path.

2019-05-24 Thread Brett Cannon
On Fri, May 24, 2019 at 11:52 AM Batuhan Taskaya wrote: > The bpo i referenced can explain it better. An example; > >def foo(): pass >assert foo.__code__.co_filename = os.path.abspath(foo.__code__.co_filename) > > Do realize there's a reason that issue has been open for well over five

Re: [Python-ideas] (meta) Broken link to gmane.org archive of python-ideas

2019-05-13 Thread Brett Cannon
Bugs about the website should be reported to https://github.com/python/pythondotorg . On Mon, May 13, 2019 at 7:42 AM Tom Hale wrote: > On 13/5/19 5:21 pm, Steven D'Aprano wrote: > > If you don't like the mailman archives here > > > > https://mail.python.org/pipermail/python-ideas/ > > > > you

Re: [Python-ideas] CPython Bytecode Assembler

2019-04-24 Thread Brett Cannon
Since bytecode is a CPython-specific implementaiton detail I don't know if it makes sense to enshrine an assembler for it in the stdlib (if you were to ask me today if I thought the dis module belonged in the stdlib I would probably say "no", but I also know not everyone agrees with that view :) .

Re: [Python-ideas] What are the strong use cases for str.rindex()?

2019-04-23 Thread Brett Cannon
Given "abcdefabcdefabcdef", what is the last result of "abc"? x.rindex("abc") will tell you. Given [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] where is the last result of 3? reversed(x).index(3) will tell you (or x[::-1]). Notice how with lists you can easily reverse them and still get at the value since you

Re: [Python-ideas] PEP-582 and multiple Python versions

2019-04-01 Thread Brett Cannon
I just wanted to warn people that I don't know if any of the authors of PEP 582 subscribe to python-ideas and they have not brought it forward for discussion yet, so there's no guarantee of a response. On Mon, Apr 1, 2019 at 5:27 AM Calvin Spealman wrote: > While the PEP does show the version

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

2019-03-30 Thread Brett Cannon
I think this thread has gone off-topic as this mailing list is not about Gmail (the client or the service). ;) On Fri, Mar 29, 2019 at 4:21 AM Chris Angelico wrote: > On Fri, Mar 29, 2019 at 8:41 PM Steven D'Aprano > wrote: > > On Fri, Mar 29, 2019 at 02:23:52PM +1100, Chris Angelico wrote: >

Re: [Python-ideas] Unified style of cache management API

2019-03-29 Thread Brett Cannon
On Thu, Mar 28, 2019 at 10:53 AM Serhiy Storchaka wrote: > 28.03.19 19:45, Brett Cannon пише: > > So I would say that a cache-clearing function convention would be a > > reasonable starting point. If that turns out to not be enough for folks > > we can talk about expandi

Re: [Python-ideas] Unified style of cache management API

2019-03-28 Thread Brett Cannon
On Wed, Mar 27, 2019 at 10:34 AM Serhiy Storchaka wrote: > 27.03.19 15:46, Ma Lin пише: > > re module [1] and struct module [2] have module-level cache for compiled > > stuffs. > > Other third-party modules may also need cache for something. > > > > Do we need an unified cache management API

Re: [Python-ideas] Unified style of cache management API

2019-03-27 Thread Brett Cannon
On Wed, Mar 27, 2019 at 6:47 AM Ma Lin wrote: > re module [1] and struct module [2] have module-level cache for compiled > stuffs. > Other third-party modules may also need cache for something. > > Do we need an unified cache management API like this? > Need? No. Nice to have? Maybe. > I

Re: [Python-ideas] A directive for indentation type, stricter indentation parsing.

2019-03-25 Thread Brett Cannon
On Mon, Mar 25, 2019 at 9:33 AM Mikhail V wrote: > Not a proposal yet, but some thoughts: > I think it would help in a longer perspective if a user could > include a directive in the header of the source code file that > defines indentation character(s) for this source file. So this > source

Re: [Python-ideas] META: Is a PEP a good place to record Python's core design decisions and coding principles?

2019-03-25 Thread Brett Cannon
On Sun, Mar 24, 2019 at 10:34 AM Jonathan Fine wrote: > Guido van Rossum wrote: > >> I think this belongs in a personal blog, not on python-ideas and >> definitely not in a PEP. >> > > I don't agree, but I will accept that judgement, as if Guido still had > BDFL status. > To help add more

Re: [Python-ideas] PEP: Dict addition and subtraction

2019-03-15 Thread Brett Cannon
On Fri, Mar 15, 2019 at 11:15 AM Steven D'Aprano wrote: > On Fri, Mar 15, 2019 at 10:34:45AM -0700, Brett Cannon wrote: > > > Watch the tone please. > > Brett, you might have missed my comment about wanting to avoid unhelpful > arguments about tone, but if you are go

Re: [Python-ideas] PEP: Dict addition and subtraction

2019-03-15 Thread Brett Cannon
On Fri, Mar 15, 2019 at 4:36 AM Antoine Pitrou wrote: > On Thu, 7 Mar 2019 10:58:02 +1100 > Chris Angelico wrote: > > > > Lots of words that basically say: Stuff wouldn't be perfectly pure. > > Chris, please learn to think twice before contributing what is > essentially a trivialization of

Re: [Python-ideas] Attribute-Getter Syntax Proposal

2019-03-08 Thread Brett Cannon
On Fri, Mar 8, 2019 at 8:57 AM Samuel Li wrote: > Don't know if this has been suggested before. Instead of writing something > like > > >>> map(lambda x: x.upper(), ['a', 'b', 'c']) > > I suggest this syntax: > >>> map(.upper(), ['a', 'b', 'c']) > Do note you get the same results with

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

2019-03-04 Thread Brett Cannon
On Mon, Mar 4, 2019 at 1:29 PM Neil Girdhar wrote: > On Mon, Mar 4, 2019 at 3:58 PM Christopher Barker > wrote: > > > > > > > > On Mon, Mar 4, 2019 at 12:41 PM Guido van Rossum > wrote: > >> > >> Honestly I would rather withdraw the subtraction operators than reopen > the discussion about

Re: [Python-ideas] PEP: Dict addition and subtraction

2019-03-01 Thread Brett Cannon
On Fri, Mar 1, 2019 at 8:50 AM Brandt Bucher wrote: > I’ve never been part of this process before, but I’m interested in > learning and helping any way I can. > Thanks! > > My addition implementation is attached to the bpo, and I’m working today > on bringing it in line with the PEP in its

Re: [Python-ideas] About PEP-582

2019-02-19 Thread Brett Cannon
On Tue, Feb 19, 2019 at 3:29 PM Philip Bergen via Python-ideas < python-ideas@python.org> wrote: > First attempt at this, so please be gentle. :) > I am very interested in the overall goal of not needing virtualenvs, but > I'm curious about the motivations behind pep-582. > In a word,

Re: [Python-ideas] add fluent operator to everything

2019-02-19 Thread Brett Cannon
On Tue, Feb 19, 2019 at 6:23 AM Jimmy Girardet wrote: > Hi, > > There was the discussion about vector, etc... > > I think I have a frustration about chaining things easily in python in > the stdlib where many libs like orm do it great. > > Here an example : > > The code is useless, just to show

[Python-ideas] CoC violation (was: Retire or reword the "Beautiful is better than ugly" Zen clause)

2018-09-20 Thread Brett Cannon
The below email was reported to the PSF board for code of conduct violations and then passed on to the conduct working group to decide on an appropriate response. Based on the WG's recommendation and after discussing it with Titus, the decision has been made to ban Jacco from python-ideas.

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

2018-09-20 Thread Brett Cannon
On Tue, 18 Sep 2018 at 12:20 Ethan Furman wrote: > On 09/18/2018 12:05 PM, Franklin? Lee wrote: > > On Tue, Sep 18, 2018 at 2:37 PM Jonathan Goble wrote: > > >> Perhaps not, but part of that might be because stopping an active > >> discussion on a mailing list can be hard to do, so one might

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

2018-09-17 Thread Brett Cannon
On Mon., Sep. 17, 2018, 13:21 James Lu, wrote: > How can the Zulip chat be joined? Im interested in consolidating all the > discussion into one centralized forum. > No consolidation is happening yet. We're testing out mailing list alternatives on smaller, more manageable lists first before we

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

2018-09-14 Thread Brett Cannon
On Thu, 13 Sep 2018 at 13:10 Koos Zevenhoven wrote: > > If you can't tell inclusivity/diversity from political correctness, or > dirty words from dirty bytes or from unfriendliness and intolerance, you'd > better go fuck yourself. > That language and tone is entirely uncalled for and you have

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

2018-09-06 Thread Brett Cannon
On Thu, 6 Sep 2018 at 09:51 Ethan Furman wrote: > On 09/06/2018 07:05 AM, Anders Hovmöller wrote: > > On Thursday, September 6, 2018 at 3:11:46 PM UTC+2, Steven D'Aprano > wrote: > >> On Thu, Sep 06, 2018 at 12:15:46PM +0200, Anders Hovmöller wrote: > > >>> Wouldn't it be awesome if [...] > >> >

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

2018-08-27 Thread Brett Cannon
On Fri, 24 Aug 2018 at 18:18 Mike Barnett wrote: > It’s fascinating just how many packages are being dragged out for > examination or clobbering other than the one that I asked for > assistance/help on. > > > > I see the code of conduct link in the thread. Perhaps a review would be > helpful. >

[Python-ideas] Conduct on python-ideas

2018-08-13 Thread Brett Cannon
I'm starting a new thread on this to make sure it receives appropriate visibility for everyone on this list. *There are ramifications for those involved in this whole situation* as outlined at the end of this email. To review, this mailing list operates under the PSF Community Code of Conduct:

Re: [Python-ideas] Performance improvements via static typing

2018-07-21 Thread Brett Cannon
On Fri, Jul 20, 2018, 02:33 Stefan Behnel, wrote: > Michael Hall schrieb am 19.07.2018 um 15:51: > > While I am aware of projects like Cython and mypy, it seems to make sense > > for CPython to allow optional enforcement of type hints, with compiler > > optimizations related to it to be used.

[Python-ideas] if we were to ever shorten `A if A else B` (was: PEP 505: None-aware operators)

2018-07-20 Thread Brett Cannon
On Thu, 19 Jul 2018 at 14:29 Steve Dower wrote: > [SNIP] > > * "We could have 'else', we don't need '??'" > > This is the "a else 'default'" rather than "a ?? 'default'" proposal, > which I do like the look of, but I think it will simultaneously mess > with operator precedence and also force me

  1   2   >