Re: [Python-ideas] PEP 550 v2

2017-08-16 Thread Stefan Krah
xample, should PyDecContext inherit from ContextItem? I don't fully understand. :-/ Stefan Krah ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] PEP 550 v2

2017-08-16 Thread Stefan Krah
gt;PyDecContextObject *ctx = PyContext_GetItem(_current_ctx); >if (ctx == NULL) { /* error */ } >if (ctx == Py_None) { /* not initialized, nothing is there */ } Thanks! This makes it a lot clearer. I'd probably use (stealing Nick's key suggestion): PyEnvKey *_current_context_key = PyEnv_Ne

Re: [Python-ideas] PEP 550 v2

2017-08-16 Thread Stefan Krah
naming collision with decimal.localcontext() would also be > desirable. > > Yury, what do you think about moving the ExecutionContext name to what > the PEP currently calls LocalContext, and renaming the current > ExecutionContext type to ExecutionContextChain? For me this

[Python-ideas] New PEP 550: Execution Context

2017-08-12 Thread Stefan Krah
this speed be achieved with the execution contexts? IOW, can the lookup of an excecution context be as fast as PyThreadState_GET()? Stefan Krah ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas

Re: [Python-ideas] PEP 550 v2

2017-08-16 Thread Stefan Krah
On Wed, Aug 16, 2017 at 12:40:26PM -0400, Yury Selivanov wrote: > On Wed, Aug 16, 2017 at 12:08 PM, Stefan Krah <ste...@bytereef.org> wrote: > > On Wed, Aug 16, 2017 at 11:00:43AM -0400, Yury Selivanov wrote: > >> "Context" is an established term for what PEP

Re: [Python-ideas] PEP draft: context variables

2017-10-15 Thread Stefan Krah
d libraries (which IMO is a bigger problem than the often cited generator issues) would be solved. It would probably not work best (or even at all) for the async call chain use case. Stefan Krah ___ Python-ideas mailing list Python-ideas@python.or

Re: [Python-ideas] Why not picoseconds?

2017-10-16 Thread Stefan Krah
; > > > > > Do we realize that at this level of accuracy, relativistic time dilatation > due > to continental drift starts to matter? tai64na has supported attoseconds for quite some time: https://cr.yp.to/libtai/tai64.html The relativity issue is declared to be ou

[Python-ideas] PEP draft: context variables

2017-10-12 Thread Stefan Krah
nderstanding, but (except for the performance issues) shouldn't be the centerpiece of the discussion. Speaking of performance, I have seen that adressed in Koos' PEP at all. Perhaps I missed something. Stefan Krah ___ Python-ideas mailing list

Re: [Python-ideas] PEP 550 dumbed down

2017-08-24 Thread Stefan Krah
ot;subclasses" of ExecutionContexts like SecurityContext, HostExecutionContext, CallContext and there's colorful terminology like "flowing the Execution Context". Stefan Krah ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Memory limits [was Re: Membership of infinite iterators]

2017-10-19 Thread Stefan Krah
On Thu, Oct 19, 2017 at 10:05:58AM +0200, Stephan Houben wrote: > > 2017-10-19 1:59 GMT+02:00 Steven D'Aprano <st...@pearwood.info>: > > > On Wed, Oct 18, 2017 at 02:51:37PM +0200, Stefan Krah wrote: > > > > > $ softlimit -m 10 python3 > > [...]

Re: [Python-ideas] Memory limits [was Re: Membership of infinite iterators]

2017-10-18 Thread Stefan Krah
, line 1, in MemoryError People who are worried could make a python3 alias or use Ctrl-\. Stefan Krah ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

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

2017-10-29 Thread Stefan Krah
the one fixing things anyway. And he'd get to fight feature requests and stylistic rewrites. :-) Stefan Krah ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

[Python-ideas] Official site-packages/test directory

2018-01-19 Thread Stefan Krah
make sense to have site-packages/foo.py and site-packages/test/test_foo.py. For me, this is the natural layout. Stefan Krah ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct

Re: [Python-ideas] Official site-packages/test directory

2018-01-19 Thread Stefan Krah
. I just thought that if we did have something like site-packages/stest (Guido correctly noted that "test" wouldn't work), people might use it. But it is all very speculative and I'm not really sure myself. Stefan Krah ___ Python-idea

Re: [Python-ideas] Official site-packages/test directory

2018-01-19 Thread Stefan Krah
suspected that people would complain both if foo-tests were installed automatically like pkg_resources but also if foo-tests were a separate optional package (too much hassle). Stefan Krah ___ Python-ideas mailing list Python-ideas@python.org http

[Python-ideas] Fixed point format for numbers with locale based separators

2019-01-06 Thread Stefan Krah
e, even if we never use them together. > I think it might also require a PEP, but it would be as simple as > PEP 378 for adding comma grouping formatting. Somewhere to memorialize > the decision and how we got there, including rejected alternate > proposals, would be a good th

Re: [Python-ideas] Enabling / disabling optional type hinting

2019-03-23 Thread Stefan Krah
"] ... except KeyError: print("KeyError") ... KeyError >>> >>> d = {} >>> try: d["x"] : int ... except KeyError: print("KeyError") ... Stefan Krah ___ Python-ideas mailing list Python-i

Re: [Python-ideas] Enabling / disabling optional type hinting

2019-03-23 Thread Stefan Krah
mpiler. ... to mean that the expression is also evaluated if no assignment takes place. Stefan Krah ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.o

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

2019-03-16 Thread Stefan Krah
maybe that's an argument for using '+' rather than '|' > for dict merging. If one views an ordered dict as an assoc list, '+' would mean prepending the new values to the existing ones. If one views an unordered dict as a set of ordered pairs, '|' would make sense

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

2019-05-13 Thread Stefan Krah
r have no decent searchability or archives. Stefan Krah ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] (meta) Mailman list searching

2019-05-14 Thread Stefan Krah
On Tue, May 14, 2019 at 04:46:48PM +0700, Tom Hale wrote: > How do I search this list's archives? With Google: site:mail.python.org the_search_term Google nearly always has better results than the search features of individual websites. Stefan K

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

2019-08-02 Thread Stefan Krah
e well known. The latter is probably required for larger code bases. Stefan Krah ___ 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