[Python-Dev] Re: Should I care what -3.14 // inf produces?

2021-10-02 Thread Jeff Allen
ime, to check the divsor, is not a big penalty. -- Jeff Allen ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archive

[Python-Dev] Should I care what -3.14 // inf produces?

2021-09-30 Thread Jeff Allen
rounded towards minus infinity", but I quite like decimal's. There seem to be no regression tests for floor division of floats, and for modulus only with finite arguments, perhaps intentionally. -- Jeff Allen ___ Python-Dev mailing list

[Python-Dev] Re: Problems with dict subclassing performance

2021-08-16 Thread Jeff Allen
r descriptor is always created from the function definition, then the slot is filled from the available definitions by lookup. Defining __contains__ twice would be impossible or an error. I think this has the semantics required by Python, but we'll have to wait for proof. -- Jeff Allen _

[Python-Dev] Re: Problems with dict subclassing performance

2021-08-16 Thread Jeff Allen
seems to me that someone should swallow their pride and let this thread drop once and for all, it's not bringing anything useful or relevant. Quite possibly. But I've offered a grown-up response in a separate post. -- Jeff Allen ___ Pytho

[Python-Dev] Re: name for new Enum decorator

2021-05-30 Thread Jeff Allen
On 28/05/2021 04:24, Ethan Furman wrote: The flags RED, GREEN, and BLUE are all canonical, while PURPLE and WHITE are aliases for certain flag combinations.  But what if we have something like:     class Color(Flag):     RED = 1    # 0001     BLUE = 4   # 0100    

[Python-Dev] Re: Anyone else gotten bizarre personal replies to mailing list posts?

2021-05-02 Thread Jeff Allen
Yes, I got one from the same address today. Thanks for pointing out these are individual peformances: it was annoying when I thought it was spam to the list. Although Hoi Lam Poon is a real (female) name, it may signify a generated lampoon. Jeff Allen On 23/04/2021 16:38, Nathaniel Smith

[Python-Dev] Re: In what tense should the changelog be written?

2021-05-01 Thread Jeff Allen
On 30/04/2021 13:15, Steven D'Aprano wrote: On Thu, Apr 29, 2021 at 09:52:14PM -0700, Larry Hastings wrote: D'oh!  I have a second draft already. Your NEWS entry should be written in the /present tense,/ and should start with a verb: Without a subject of the sentence, that's not presen

[Python-Dev] Re: Steering Council update for February

2021-03-10 Thread Jeff Allen
n that those tackling it here are using Python for data science. Jeff Allen ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.o

[Python-Dev] Re: unittest of sequence equality

2020-12-22 Thread Jeff Allen
there is some freedom, not interpretable as a boolean value. We are warned that this should not be expected to work. Later docs (from v2.6) refer explicitly to calling bool() as a definition of "interpretable". bool() is there from v2.3. Jeff Allen __

[Python-Dev] Re: [python-committers] Resignation from Stefan Krah

2020-10-10 Thread Jeff Allen
a reasonable approach to take. Sounds like you were doing roughly as Toshio recommends anyway (the decent thing as I'd expect), but maybe explicit is better? Jeff Allen ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an e

[Python-Dev] Re: Understanding why object defines rich comparison methods

2020-09-23 Thread Jeff Allen
each descriptor (PyWrapperDescrObject) points to a different C function (generated by the RICHCMP_WRAPPER macro). The function summons the tp_richcompare slot function in the left object's type, with arguments (left, right, op). Simple (not). Jeff Allen ___ Pyt

[Python-Dev] Re: Procedure for trivial PRs

2020-08-13 Thread Jeff Allen
know or care about this, not having any relevant rights over CPython, but I'm trying to adopt it in the projects where I do. Jeff Allen ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.or

[Python-Dev] Re: Memory address vs serial number in reprs

2020-07-25 Thread Jeff Allen
ld have to change (unlike id()), may not round-trip if __class__ were assigned there and back. Jeff Allen ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mail

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

2020-07-02 Thread Jeff Allen
York -- I believe that's in the northern part of the United States, otherwise known as "The North" or the side that fought to end slavery. E. B. White was educated at Cornell. We should acknowledge that he famously showed an interest in web development and invented a sort of

[Python-Dev] Re: My take on multiple interpreters (Was: Should we be making so many changes in pursuit of PEP 554?)

2020-06-17 Thread Jeff Allen
On 17/06/2020 19:28, Eric V. Smith wrote: On 6/17/2020 12:07 PM, Jeff Allen wrote: If (1) interpreters manage the life-cycle of objects, and (2) a race condition arises when the life-cycle or state of an object is accessed by the interpreter that did not create it, and (3) an object will

[Python-Dev] Re: My take on multiple interpreters (Was: Should we be making so many changes in pursuit of PEP 554?)

2020-06-17 Thread Jeff Allen
point (function call) where one may police object ownership, but that isn't why you need it. Jeff Allen ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailma

[Python-Dev] Re: Latest PEP 554 updates.

2020-05-07 Thread Jeff Allen
On 06/05/2020 21:52, Eric Snow wrote: On Wed, May 6, 2020 at 2:25 PM Jeff Allen wrote: ... My reason for worrying about this is that, while the C-API has been there for some time, it has not had heavy use in taxing cases AFAIK, and I think there is room for it to be incorrect. I am thinking

[Python-Dev] Re: Latest PEP 554 updates.

2020-05-06 Thread Jeff Allen
nge I think is needed. It might not have a visible effect on the PEP, but it's worth bearing in mind the risk of exposing a thing you might shortly find you want to change. Jeff Allen ___ Python-Dev mailing list -- python-dev@python.org To unsub

[Python-Dev] Re: PEP 617: New PEG parser for CPython

2020-04-06 Thread Jeff Allen
elsewhere. (I'm not plugging ANTLR specifically as a solution.) Jeff Allen On 02/04/2020 19:10, Guido van Rossum wrote: Since last fall's core sprint in London, Pablo Galindo Salgado, Lysandros Nikolaou and myself have been working on a new parser for CPython. We are now far enough alo

[Python-Dev] Re: Are PyObject_RichCompareBool shortcuts part of Python or just CPython quirks?

2020-01-26 Thread Jeff Allen
identity is determined using the |id()| function" is a little misleading but it is difficult to express the abstract concept of object identity. Jeff Allen ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email

[Python-Dev] Re: Questions about CPython's behavior on addition operator -- binary_op1 (abstract.c) and nb_add (typeobject.c)

2020-01-17 Thread Jeff Allen
". Where exactly is this wrapper applied, and how does it know when to dispatch to __add__ or __radd__? I *think* it is changed to contain slot_nb_add as defined by the macro. I hope that is somewhere near accurate. Jeff Allen

[Python-Dev] Re: Adding a scarier warning to object.__del__?

2020-01-03 Thread Jeff Allen
l__ method (and how to avoid it)" to contain the advisory points being made? In-lining advice here, on how to survive the infernal circles of __del__, dilutes the scariness of the warning not to enter at all. --- Jeff Allen ___ Python-De

[Python-Dev] Re: Missing license for file Modules/ossaudiodev.c

2019-08-19 Thread Jeff Allen
On 19/08/2019 21:30, Terry Reedy wrote: On 8/19/2019 3:19 PM, Jeff Allen wrote: When one signs up to contribute code to the PSF, one is asked to write on  contributed software that it has been "Licensed to the PSF under a Contributor Agreement" (see https://www.python.org/psf/contr

[Python-Dev] Re: Missing license for file Modules/ossaudiodev.c

2019-08-19 Thread Jeff Allen
one else's work doesn't feel right. (The situation is clear for pristene code.) I have wondered if it's an issue. Jeff Jeff Allen On 19/08/2019 15:35, Guido van Rossum wrote: The LICENSE file at the top level of the repo covers everything. On Mon, Aug 19, 2019 at 7:33 AM mihae

[Python-Dev] Re: Comparing dict.values()

2019-07-23 Thread Jeff Allen
with set demantics. Steven proposes (essentially) list semantics, but isn't it surprising that equal dictionaries should not have equal .values()? Jeff Allen ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email t

Re: [Python-Dev] Online Devguide mostly not working

2019-05-13 Thread Jeff Allen
Hiccups cured thanks to Mariatta and Carol https://github.com/python/devguide/pull/484. (And my guess was wrong.) Jeff Allen On 14/05/2019 04:49, Brett Cannon wrote: It's working for me, so it was probably just a hiccup. On Sun, May 12, 2019 at 6:19 AM Jeff Allen <mailto:ja...@faro

Re: [Python-Dev] Online Devguide mostly not working

2019-05-12 Thread Jeff Allen
Is it suspicious that in the detailed log we see: 'canonical_url': 'http://devguide.python.org/', ? I guess this comes from project admin configuration at RTD, additional to your conf.py. https://docs.readthedocs.io/en/stable/canonical.html (Just guessing really.)

Re: [Python-Dev] drop jython support in mock backport?

2019-04-30 Thread Jeff Allen
Cross-posting to jython-users for obvious reasons. Jeff Allen On 30/04/2019 10:26, Chris Withers wrote: [resending to python-dev in case there are Jython users here...] Hi All, If you need Jython support in the mock backport, please shout now: https://github.com/testing-cabal/mock/issues

Re: [Python-Dev] Need discussion for a PR about memory and objects

2018-11-20 Thread Jeff Allen
mating this second idea. There is no mechanism to reach the object itself from the result, since it does not keep the object in existence, and worse, it may now be the id of a different object. In defining id(), I think it is confusing to imply that

Re: [Python-Dev] Experiment an opt-in new C API for Python? (leave current API unchanged)

2018-11-19 Thread Jeff Allen
elated to C-API have mnemonic value, though, in translation. Maybe "static void PyFloat.pack4(double, ByteBuffer, boolean)" would do the trick. It makes sense for JyNI to supply it by the exact C API name, and all other API that C extensions a

Re: [Python-Dev] Need discussion for a PR about memory and objects

2018-11-18 Thread Jeff Allen
t, and a different integer for any distinct object (distinct identity) with an overlapping lifetime. We note that, in an implementation of Python where objects are fixed in memory for life, a conformant id() may return the object's address. Jeff Allen

Re: [Python-Dev] Arbitrary non-identifier string keys when using **kwargs

2018-10-14 Thread Jeff Allen
to do what CPython does. It's also easier than keeping a record. Rarely, we manage to exceed CPython (in consistency or coverage) by a tiny amount. Jeff Allen ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/list

Re: [Python-Dev] Every Release Can Be a Mini "Python 4000", Within Reason (was (name := expression) doesn't fit the narrative of PEP 20)

2018-04-30 Thread Jeff Allen
On 30/04/2018 07:22, Greg Ewing wrote: Jeff Allen wrote: I speculate this all goes back to some pre-iteration version of FORmula TRANslation, where to its inventors '=' was definition and these really were "statements" in the normal sense of stating a truth. Yeah, also

Re: [Python-Dev] Every Release Can Be a Mini "Python 4000", Within Reason (was (name := expression) doesn't fit the narrative of PEP 20)

2018-04-29 Thread Jeff Allen
anyone learns algebra before programming. I speculate this all goes back to some pre-iteration version of FORmula TRANslation, where to its inventors '=' was definition and these really were "statements" in the normal sense of stating a truth. Jeff Allen

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-24 Thread Jeff Allen
ine as x - x_base, and g, which ." etc. That's good. It also makes it natural to expect only a simple name. One can "define" a name, but assignment to a complex left-side expression is not definition (binding). Jeff Allen ___ Py

Re: [Python-Dev] Subtle difference between f-strings and str.format()

2018-03-29 Thread Jeff Allen
k users should be able to rely on the semantics of call. Easier optimisation doesn't seem to me a strong enough argument. This leaves me at: 1: +1 2a, 2b: +0 3: -1 Jeff Allen ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Is object the most base type? (bpo-20285)

2018-02-02 Thread Jeff Allen
s, including arrays, implement the methods of this class." Either for me, but I feel I should draw attention to the spelling. (Java is right.) Ironically, the word derives from priesthood (hieratic), not from inheritance (heir). Jeff Allen ___

Re: [Python-Dev] PEPs: ``.. code:: python`` or ``::`` (syntax highlighting)

2017-12-04 Thread Jeff Allen
thedocs.io/en/latest/faq.html#i-want-to-use-the-blue-default-sphinx-theme [8] https://github.com/python/devguide Jeff Allen On 03/12/2017 04:49, Wes Turner wrote: Add pygments for ``.. code::`` directive PEP syntax highlighting #1206 https://github.com/python/pythondotorg/issues/1206 Syntax hi

Re: [Python-Dev] "Micro-optimisations can speed up CPython"

2017-05-30 Thread Jeff Allen
ng Language, K&R 1978 (p197). With these Python name spaces, you're really spoiling us, Mr BDFL. Jeff Allen ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Removing memoryview object patch from Python 2.7

2016-12-14 Thread Jeff Allen
your code. Python-dev is about developing the language. Python-list is the place to ask questions about using the language. However, good hunting! Jeff Allen On 14/12/2016 12:09, Sesha Narayanan Subbiah wrote: Thanks Rob. I will try upgrade to 2.7.12. Any idea of this memory view object that

Re: [Python-Dev] O(1) deletes from the front of bytearray (was: Re: Adding bytes.frombuffer() constructor to PEP 467 (was: [Python-ideas] Adding bytes.frombuffer() constructor)

2016-10-13 Thread Jeff Allen
unused space reaches some limit. I think that should make it O(log N) on average to delete (or add) a byte, at either end of a buffer of size N,. However, observations with timeit() look constant up to the point I run out of heap. Jeff Allen ___ Python

Re: [Python-Dev] Support of UTF-16 and UTF-32 source encodings

2015-11-15 Thread Jeff Allen
s a clue what a user should do, but they would need some background, a helpful teacher, or the Internet to sort it out. Jeff Allen On 15/11/2015 07:23, Stephen J. Turnbull wrote: Steve Dower writes: > Saying [UTF-16] is rarely used is rather exposing your own > unawareness though

[Python-Dev] Smuggling bytes in a UTF-16 implementation of str/unicode (was: Multilingual programming article on the Red Hat Developer blog)

2014-09-17 Thread Jeff Allen
This feels like a jython-dev discussion. But anyway ... On 17/09/2014 00:57, Stephen J. Turnbull wrote: The CPython representation uses trailing surrogates only[1], so it's never possible to interpret them as anything but non-characters -- as soon as you encounter them you know that it's a lone

Re: [Python-Dev] Multilingual programming article on the Red Hat Developer blog

2014-09-12 Thread Jeff Allen
oine) if Jython supported PEP-383 byte smuggling, it would have to do it the same way as CPython, as it is visible. It's not impossible (I think), but is messy. Some are strongly against. Jeff Allen On 12/09/2014 16:37, Jim J. Jewett wrote: On September 11, 2014, Jeff Allen wrote: ... &qu

Re: [Python-Dev] Multilingual programming article on the Red Hat Developer blog

2014-09-11 Thread Jeff Allen
On 12/09/2014 04:28, Stephen J. Turnbull wrote: Jeff Allen writes: > A welcome article. One correction should be made, I believe: the area of > code point space used for the smuggling of bytes under PEP-383 is not a > "Unicode Private Use Area", but a portion of the

Re: [Python-Dev] Multilingual programming article on the Red Hat Developer blog

2014-09-11 Thread Jeff Allen
A welcome article. One correction should be made, I believe: the area of code point space used for the smuggling of bytes under PEP-383 is not a "Unicode Private Use Area", but a portion of the trailing surrogate range. This is a code violation, which I imagine is why "surrogateescape" is an er

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-04 Thread Jeff Allen
th making this O(1) universally. Like Steven, I understand this to be a freedom afforded to implementers, rather than an issue of conformity. Jeff Allen On 04/06/2014 02:17, Steven D'Aprano wrote: There is a discussion over at MicroPython about the internal representation of Unicode string

Re: [Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable

2014-04-18 Thread Jeff Allen
it best fits in the documentation. Jeff Allen On 17/04/2014 20:49, Leandro Pereira de Lima e Silva wrote: This looks like an issue to be addressed at PEP-8 since it looks like a styling issue. I haven't seen any other recommendations there on how to use a certain data structure, though. Cheer

Re: [Python-Dev] hg branching + log question

2014-03-18 Thread Jeff Allen
well". Clearly the Python repos represent complex work, but even accepting it is all done well, are without much commentary. This is very good: http://hgbook.red-bean.com/read/ , but there are hints it has not kept up. This also: http://legacy.python.org/dev/peps/pep-0385/ Jeff Allen

Re: [Python-Dev] Python 3.3.4150

2014-02-28 Thread Jeff Allen
Jason: I get that too, now I try it. The place to report bugs is: http://bugs.python.org/ However, please take a look at http://bugs.python.org/issue14512 before you file a new one. Jeff Allen On 28/02/2014 17:05, Burgoon, Jason wrote: Good day Python Dev Team -- One of our users has

Re: [Python-Dev] PEP 463: Exception-catching expressions

2014-02-22 Thread Jeff Allen
27;m surprised to find others don't also, as that's the (only?) pronunciation that makes the familiar if-else and try-except constructs approximate English. Isn't adding a new keyword (*then*) likely to be a big deal? There is the odd example of its use as an iden

Re: [Python-Dev] Using more specific methods in Python unit tests

2014-02-16 Thread Jeff Allen
7;s test facilities from this work. It was a while before I realised more expressive methods were available. Jeff Jeff Allen ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-29 Thread Jeff Allen
On 29/04/2013 15:42, Armin Rigo wrote: On Sat, Apr 27, 2013 at 4:39 AM, Nikolaus Rath wrote: It's indeed very informative, but it doesn't fully address the question because of the _pyio module which certainly can't use any custom C code. Does that mean that when I'm using x = _pyio.BufferedWrit

Re: [Python-Dev] Recent changes to TextIOWrapper and its tests

2013-03-20 Thread Jeff Allen
On 19/03/2013 08:03, Serhiy Storchaka wrote: On 18.03.13 22:26, Jeff Allen wrote: The puzzle is that it requires t.read() to succeed. When I insert a check for bytes type in all the places it seems necessary in my code, I pass the first two conditions, but since t.read() also raises TypeError

[Python-Dev] Recent changes to TextIOWrapper and its tests

2013-03-18 Thread Jeff Allen
read() intended to succeed? Why is this desired? Jeff Allen ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 433: Add cloexec argument to functions creating file descriptors

2013-01-17 Thread Jeff Allen
On 17/01/2013 13:02, Victor Stinner wrote: 2013/1/13 Jeff Allen: I think io, meaning _io and _pyio really, would be amongst the impacted modules, and should perhaps be in the examples. (I am currently working on the Jython implementation of the _io module.) It seems to me that io.open, and

Re: [Python-Dev] PEP 433: Add cloexec argument to functions creating file descriptors

2013-01-14 Thread Jeff Allen
ticed were minor, and I infer that they should wait until principles are settled. Jeff Allen ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/

Re: [Python-Dev] Understanding the buffer API

2012-12-18 Thread Jeff Allen
lti-byte items, as a way to export arrays of other types, makes no sense in Java where type security is strict and a parallel but type-safe approach will be needed. Jeff Allen ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mail

Re: [Python-Dev] [Python-checkins] cpython: Issue #16592: stringlib_bytes_join doesn't raise MemoryError on allocation

2012-12-02 Thread Jeff Allen
k there's a lot to be said for cut and paste of actual titles on grounds of accuracy and speed (and perhaps scriptability). E.g. http://hg.python.org/jython/file/661a6baa10da/NEWS Jeff Allen ___ Python-Dev mailing list Python-Dev@python.org ht

Re: [Python-Dev] Py_buffer.obj documentation

2012-08-29 Thread Jeff Allen
d. mbuf->master must not also keep a reference, or it risks making a second call to DECREF(obj). Jeff Allen ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/ma

Re: [Python-Dev] Jython roadmap

2012-08-21 Thread Jeff Allen
7;s still to do, who's doing it, and where the gaps are, which is probably what you're looking for. ... Frank? Jeff Allen ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Understanding the buffer API

2012-08-05 Thread Jeff Allen
- Summary: The PEP, or sometimes just the documentation, definitely requires that features not requested shall be NULL. The API would benefit from: a. stored flags that tell you the actual structural features. b. requiring exporters to provide full information (e.g. strides = {1}, fo

Re: [Python-Dev] Understanding the buffer API

2012-08-04 Thread Jeff Allen
of course give you raw memory it thinks is one thing, to treat as another, so this aspect is immature in my thinking. I got as far as accommodating multi-byte items, but have no use for them as yet. Thanks again for the chance to test my ideas. Jeff Allen ___

[Python-Dev] Understanding the buffer API

2012-08-03 Thread Jeff Allen
PEP I can't simply give it the original buffer since required fields (that the consumer will presumably not access) are not NULL. In practice, I'd like to: what could possibly go wrong? Jeff Allen ___ Python-Dev mailing list Python-Dev@