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

2014-04-21 Thread Raymond Hettinger
their implementations. It is only important because the rest of the language tends to treat them differently. For example, you could store ['raymond', 'red'] as a list or as a tuple ('raymond', 'red'), but you wouldn't be punished until later when yo

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Raymond Hettinger
ed to know a great deal more about security than the warning message can supply. My understanding is that actual gaming systems use seeded CSPRNGs rather than urandom() because those systems need to be auditable. Raymond P.S. The docs for the random module had a successful 20 year history without the

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Raymond Hettinger
ar, concise, not preachy, and not littered with distractions. Raymond ___ 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] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Raymond Hettinger
On May 10, 2014, at 4:15 PM, Stefan Behnel wrote: > Total +1 on keeping these little bits around. Since all of you want a warning, I'll add one back but with improved wording. I'm not all at comfortable with the wording of the second sentence. I was the author of the SystemRandom() class and I

[Python-Dev] Patch for robotparser.py

2014-05-11 Thread Raymond Hettinger
If there is anyone here with an interest in web-spiders, it would be nice if someone else could take a look at http://bugs.python.org/issue21469 which addresses the risk of false positives with the robots.txt parser. Raymond ___ Python-Dev

Re: [Python-Dev] devguide: Add myself to developer log and as a Windows expert.

2014-05-11 Thread Raymond Hettinger
On May 11, 2014, at 6:57 AM, Steve Dower wrote: > Thanks. > > For those who missed the earlier discussions, Martin v. Löwis has handed over > responsibility for the Windows installers. It sounds like Brett Cannon and I > are both in a position to build 2.7 right now, and I hope to simplify th

Re: [Python-Dev] Merge conflicts from unmerged 3.4 commits, what do I do?

2014-05-18 Thread Raymond Hettinger
and 90755 by Raymond Hettinger 8 hours > ago. From earliest to lastest: > > c67a19e11a71 > 7c5f1b200a24 > 35ea333f43bd > 31211947387b > 854fd62f > > If there was any notice on the Committer's list about not making commits, I > did not get it. In fact, I do

Re: [Python-Dev] cpython: Minor clean-ups for heapq.

2014-05-27 Thread Raymond Hettinger
On May 27, 2014, at 1:58 AM, Serhiy Storchaka wrote: > Perhaps it is worth to add simple comment explaining why this is not > equivalent to just list(zip(it, range(n))). Otherwise it can be > unintentionally "optimized" in future. FWIW, that is covered by the test cases. If you substitute lis

Re: [Python-Dev] Updating turtle.py

2014-06-01 Thread Raymond Hettinger
On May 30, 2014, at 8:32 PM, Terry Reedy wrote: > B. Lets assuming that turtle.py is, at least to some degree, fair game for > fixes and enhancements. PSF Python PyLadies (Jessica Keller, Lynn Root) are > participating in the 2014 GNOME Outreach Program for Women (OPW) > https://wiki.python.o

Re: [Python-Dev] Should standard library modules optimize for CPython?

2014-06-01 Thread Raymond Hettinger
On Jun 1, 2014, at 9:17 AM, Antoine Pitrou wrote: > Le 01/06/2014 10:11, Steven D'Aprano a écrit : >> >> My feeling is that the CPython standard library should be written for >> CPython, that is, it should stick to the current naive implementation of >> median, and if PyPy wants to speed the fu

Re: [Python-Dev] namedtuple implementation grumble

2014-06-08 Thread Raymond Hettinger
le-like class with indexable elements that are also accessible using named attributes). Raymond ___ 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] namedtuple implementation grumble

2014-06-08 Thread Raymond Hettinger
out ABC extension might be worth it if it provided some non-trivial mixin capabilities for implementing homegrown named tuples (not created by the factory function), but I don't think we want to go there. The problem isn't important enough to warrant throwing this much code and a

Re: [Python-Dev] namedtuple implementation grumble

2014-06-09 Thread Raymond Hettinger
On Jun 9, 2014, at 4:40 AM, Antoine Pitrou wrote: > Instead of an ABC, why not a simple is_namedtuple() function? That would work. Raymond ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-

Re: [Python-Dev] Tracker Stats

2014-06-20 Thread Raymond Hettinger
On Jun 20, 2014, at 10:30 AM, Ezio Melotti wrote: > I added a new "stats" page to the bug tracker: > http://bugs.python.org/issue?@template=stats > The page can be reached from the sidebar of the bug tracker: Summaries -> > Stats > The data are updated once a week, together with the Summary of

Re: [Python-Dev] [issue34221] Any plans to combine collections.OrderedDict with dict

2018-07-25 Thread Raymond Hettinger
id, now that regular dicts are ordered by default, the need for collections.OrderedDict() should diminish quite a bit. Mostly, I think people will ignore OrderedDict unless their application heavily exercises move to end operations. Raymond ___ Python-Dev mai

Re: [Python-Dev] [issue34221] Any plans to combine collections.OrderedDict with dict

2018-07-26 Thread Raymond Hettinger
s compatible with older Pythons. The proposed repr does look pretty but probably isn't worth the disruption. Raymond -- $ python3.7 -m timeit -r 7 'from collections import OrderedDict' "OrderedDict([('a', '1'), ('b', '

Re: [Python-Dev] Testing C API

2018-07-29 Thread Raymond Hettinger
intaining something like marshal, it would be easy to miss some of the tests if they are in a separate file. IMO, the proposed change would hinder future maintenance and fly in the face of our traditional code organization. Raymond ___ Python-Dev

Re: [Python-Dev] Testing C API

2018-07-30 Thread Raymond Hettinger
> On Jul 30, 2018, at 12:06 AM, Serhiy Storchaka wrote: > > 30.07.18 09:46, Raymond Hettinger пише: >> I prefer the current organization that keeps the various tests together with >> the category being tested. I almost never need to run the C API tests all >> at

Re: [Python-Dev] Postponed annotations break inspection of dataclasses

2018-09-23 Thread Raymond Hettinger
__(self, key, value): print(f'{key!r}: {value!r}') >>> exec('a=b', globals(), M()) 'a': 'B' Raymond ___ 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

[Python-Dev] General concerns about C API changes

2018-11-13 Thread Raymond Hettinger
project with many PRs going directly into master, so it does warrant having buy in that the churn isn't destabilizing and will actually produce a benefit that is worth it. Raymond ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Lost sight

2019-01-20 Thread Raymond Hettinger
> On Jan 19, 2019, at 2:12 AM, Serhiy Storchaka wrote: > > I have virtually completely lost the sight of my right eye (and the loss is > quickly progresses) and the sight of my left eye is weak. I hope this only temporary. Best wishe

[Python-Dev] How to update namedtuple asdict() to use dict instead of OrderedDict

2019-01-30 Thread Raymond Hettinger
rrently depending on the reordering methods for the output of _asdict(), the remediation is trivially simple: nt._asdict() -> OrderedDict(nt.as_dict()). What do you all think? Raymond ___ Python-Dev mailing list Python-Dev@python.org htt

Re: [Python-Dev] How to update namedtuple asdict() to use dict instead of OrderedDict

2019-01-30 Thread Raymond Hettinger
> On Jan 30, 2019, at 6:00 PM, David Mertz wrote: > > Ditto +1 option 4 > > On Wed, Jan 30, 2019, 5:56 PM Paul Moore On Wed, 30 Jan 2019 at 22:35, Raymond Hettinger > wrote: > > My recommendation is Option 4 as being less disruptive and more beneficial > > t

Re: [Python-Dev] How to update namedtuple asdict() to use dict instead of OrderedDict

2019-01-30 Thread Raymond Hettinger
'm really just aiming for something as simple as s/OrderedDict/dict in namedtuple :-) Raymond ___ 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] Fwd: How about updating OrderedDict in csv and configparser to regular dict?

2019-01-31 Thread Raymond Hettinger
> On Jan 31, 2019, at 3:06 AM, Steve Holden wrote: > > And I see that such a patch is now merged. Thanks, Raymond! And thank you for getting ordering into csv.DictReader. That was a significant improvement in usability :-) Raymond _

Re: [Python-Dev] Asking for reversion

2019-02-03 Thread Raymond Hettinger
maintainers for multiprocessing even though that is what he's been working on for the last two years and at the last two sprints. I'd like to see more team work here rather than applying social pressures via python-dev (which is a *very* public list). Raymond ___

Re: [Python-Dev] Asking for reversion

2019-02-03 Thread Raymond Hettinger
ple disadvantage (the cost of moving data between processes). It's something we really want. But let's see what the 3.8 release manager has to say. Raymond ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/

Re: [Python-Dev] Asking for reversion

2019-02-04 Thread Raymond Hettinger
> On Feb 4, 2019, at 2:36 AM, Łukasz Langa wrote: > > @Raymond, would you be willing to work with Davin on finishing this work in > time for alpha2? I would be happy to help, but this is beyond my technical ability. The people who are qualified to work on this have already chim

Re: [Python-Dev] Asking for reversion

2019-02-05 Thread Raymond Hettinger
uld really use some help and support from everyone on the team. Raymond ___ 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] Add minimal information with a new issue?

2019-02-21 Thread Raymond Hettinger
anything that raises the cost of filing a bug report will work to our detriment. Ideally, we want the barriers to reporting to be as low as possible. Raymond ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/p

[Python-Dev] Possible performance regression

2019-02-24 Thread Raymond Hettinger
today), so I'm hoping other folks can run checks as well. Raymond -- Yesterday $ ./python.exe Tools/scripts/var_access_benchmark.py Variable and attribute read access: 4.0 ns read_local 4.5 ns

Re: [Python-Dev] Possible performance regression

2019-02-25 Thread Raymond Hettinger
read_local > 19.4 ns read_nonlocal These timings are several times larger than they should be. Perhaps you're running a debug build? Or perhaps 32-bit? Or on VM or some such. Something looks way off because I'm getting 4 and 5 ns on my 2013 Haswell laptop. Raymond

Re: [Python-Dev] Possible performance regression

2019-02-25 Thread Raymond Hettinger
re to try to solicit independent confirmation. Raymond ___ 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] Compact ordered set

2019-02-26 Thread Raymond Hettinger
temper the enthusiasm with rationality and caution. The existing setobject code has been finely tuned and micro-optimized over the years, giving it excellent performance on workloads we care about. It would be easy throw all of that away. Raymond __

Re: [Python-Dev] Compact ordered set

2019-02-26 Thread Raymond Hettinger
o consider this when bumping the load factor down to 60%, prioritizing speed over space. Raymond ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/option

Re: [Python-Dev] Possible performance regression

2019-02-26 Thread Raymond Hettinger
ad based. That said, it seems to be compiler specific and only affects the Mac builds, so maybe we can decide that we don't care. Raymond ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Uns

Re: [Python-Dev] Possible performance regression

2019-02-26 Thread Raymond Hettinger
ed it out of a local minimum and that performance will return the next time someone touches the eval-loop. Raymond ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: htt

[Python-Dev] Is XML serialization output guaranteed to be bytewise identical forever?

2019-03-18 Thread Raymond Hettinger
n standard library modules guarantee cross-release bytewise identical output for XML. That is really the core issue here. Had we had an explicit notice one way or the other, there wouldn't be an issue now. Any thoughts? Raymond Hettinger P.S. Stefan Behnel is planning to remove

Re: [Python-Dev] Is XML serialization output guaranteed to be bytewise identical forever?

2019-03-18 Thread Raymond Hettinger
uld it make sense as an option? Time machine! Stéphane Wirtel just posted a basic semantic comparison between two streams.¹ Presumably, there would need to be a range of options for specifying what constitutes equivalence but this is a nice start. Raymond ¹ https://bugs.python.org

[Python-Dev] Best way to specify docstrings for member objects

2019-03-19 Thread Raymond Hettinger
worked out examples below. What do you all think about the proposal? Raymond ¹ https://bugs.python.org/issue36326 == Desired help() output == >>> help(NormalDist) Help on class NormalDist in module __main__: class NormalDist(builtins.object) | NormalDist(mu=0.0, sigma=1.

Re: [Python-Dev] Best way to specify docstrings for member objects

2019-03-19 Thread Raymond Hettinger
. But then, you never can tell ;-) Raymond "Difficult to see. Always in motion is the future." -- Master Yoda ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail

Re: [Python-Dev] Best way to specify docstrings for member objects

2019-03-20 Thread Raymond Hettinger
om the standard library), the help() is clearly better with the annotations than without. Raymond ___ 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] Best way to specify docstrings for member objects

2019-03-20 Thread Raymond Hettinger
> definition have no access to the class object. > Logically speaking, a definition item should be able to see everything that > is defined before it. The member objects get created downstream by the type() metaclass. So, there isn't a vi

Re: [Python-Dev] Best way to specify docstrings for member objects

2019-03-20 Thread Raymond Hettinger
special -- they just make regular classes, similar to or better than you would write by hand. Raymond ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailma

Re: [Python-Dev] Is XML serialization output guaranteed to be bytewise identical forever?

2019-03-20 Thread Raymond Hettinger
27;s recipe for reordering attributes * make a semantic level comparison Will any other these work for you? Raymond ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.

Re: [Python-Dev] Is XML serialization output guaranteed to be bytewise identical forever?

2019-03-20 Thread Raymond Hettinger
ML tools in other languages (such as Java) don't sort (and likely for good reason). LXML is dropping its attribute sorting as well, so the standard library would become more of an outlier. Raymond ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Is XML serialization output guaranteed to be bytewise identical forever?

2019-03-20 Thread Raymond Hettinger
n. It's up to you all to do the right thing. Raymond ___ 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

[Python-Dev] Re: What is a public API?

2019-07-13 Thread Raymond Hettinger
s mostly worked out fine and didn't require a strict rule for all modules everywhere. IMO, there is no need to sweep through the library and change long-standing policies on existing modules. Raymond -- >>> import calendar >>&

[Python-Dev] Re: The order of operands in the comparison

2019-07-21 Thread raymond . hettinger
FWIW, the bisect_left and bisect_right functions have different argument order so that they can both use __lt__, making them consistent with sorting and with the heapq functions. Raymond ___ Python-Dev mailing list -- python-dev@python.org To

[Python-Dev] What to do about invalid escape sequences

2019-08-04 Thread raymond . hettinger
on how you use Python, this may not affect you or it may arise multiple times per day. Raymond P.S. Before responding, it would be a useful exercise to think for a moment about whether you remember exactly which characters must be escaped or whether you habitually put in an extra backsl

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-05 Thread raymond . hettinger
Thanks for looking at other languages do. It gives some hope that this won't end-up being a usability fiasco. ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailm

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-05 Thread raymond . hettinger
in their filename. Yes, I've seen that as well. Unfortunately, the syntax warning or error doesn't detect that case. It only complains about invalid sequences which weren't the actual problem we were trying to solve. The new warning soon-to-be error breaks code that currently

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-05 Thread raymond . hettinger
End-user experience isn't something that can just be argued away. Steve and I are reporting a recurring annoyance. The point of a beta release is to elicit these kinds of reports so they can be addressed before it is too late. ISTM you are choosing not to believe the early feedback and don't

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-07 Thread raymond . hettinger
For me, these warnings are continuing to arise almost daily. See two recent examples below. In both cases, the code previously had always worked without complaint. - Example from yesterday's class ''' How old-style formatting works with positional placeholders print('The answer is %

[Python-Dev] Re: What to do about invalid escape sequences

2019-08-07 Thread raymond . hettinger
This isn't about me. As a heavy user of the 3.8 beta, I'm just the canary in the coal mine. After many encounters with these warnings, I'm starting to believe that Python's long-standing behavior was convenient for users. Effectively, "\-" wasn't an error, it was just a way of writing "\-". F

[Python-Dev] Re: Changing Python's string search algorithms

2020-10-18 Thread Raymond Hettinger
> On Oct 17, 2020, at 2:40 PM, Tim Peters wrote: > > Still waiting for someone who thinks string search speed is critical > in their real app to give it a try. In the absence of that, I endorse > merging this. Be bold. Merge it.

[Python-Dev] Re: Drop Solaris, OpenSolaris, Illumos and OpenIndiana support in Python

2020-10-30 Thread Raymond Hettinger
s day." -- abarbu * ... and many more will the same flavor Given this kind of user response, I think it would irresponsible to drop support. Raymond ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to p

[Python-Dev] Re: Drop Solaris, OpenSolaris, Illumos and OpenIndiana support in Python

2020-10-30 Thread Raymond Hettinger
nvest resources either in the form of developers or dollars to keep the port alive we will. By we I mean RackTop and/or Staysail Systems." -- https://twitter.com/gedamore/status/1321959956199866369 Raymond ___ Python-Dev mailing list --

[Python-Dev] Re: Drop Solaris, OpenSolaris, Illumos and OpenIndiana support in Python

2020-10-30 Thread Raymond Hettinger
> On Oct 30, 2020, at 4:51 PM, Gregory P. Smith wrote: > > On Fri, Oct 30, 2020 at 1:14 PM Raymond Hettinger > wrote: > FWIW, when the tracker issue landed with a PR, I became concerned that it > would be applied without further discussion and without consulting users. >

[Python-Dev] Re: Please do not remove random bits of information from the tutorial

2020-11-09 Thread Raymond Hettinger
easy, then let's just rename it to "Language walk-through with examples" or some such. * FWIW, I've closely monitored the bug tracker daily for almost two decades. We almost never get a user complaint that the tutorial is too advanced. For the most part, it has long been of

[Python-Dev] Re: Announcing the CPython Docs Workgroup

2021-05-01 Thread Raymond Hettinger
Please add me to the list of members for the initial workgroup. Thank you, Raymond ___ 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

[Python-Dev] Re: Announcing the CPython Docs Workgroup

2021-05-03 Thread Raymond Hettinger
initial group excludes our most active documentation contributors and includes people who have only minimal contributions to existing documentation and mostly have not participated in any documentation reviews on the issue tracker. Did the SC approve all the initial members? Raymond

[Python-Dev] Re: PEP 467 feedback from the Steering Council

2021-08-10 Thread raymond . hettinger
I recommend removing the "discouragement" from writing "bytes(10)". That is merely stylistic. As long as we support the API, it is valid Python. In the contexts where it is currently used, it tends to be clear about what it is doing: buffer = bytearray(bufsize). That doesn't need to be disco

[Python-Dev] Re: PEP 467 feedback from the Steering Council

2021-09-09 Thread raymond . hettinger
mber of use cases also matters. The bar for adding a new builtin function is very high. Raymond ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/li

Re: [Python-Dev] IDLE in the stdlib

2013-03-20 Thread Raymond Hettinger
day. For those of us who have to support people with basic installs, it is essential that they have some Python aware editor on their machine. Without IDLE, a shocking number of people would create Python files using notepad. Raymond ___ Python-De

Re: [Python-Dev] Can we triple quoted string as a comment?

2013-03-25 Thread Raymond Hettinger
On Mar 25, 2013, at 2:16 PM, Victor Stinner wrote: > Hi, > > I just realized that the Python peephole optimizer removes useless > instructions like numbers and strings between other instructions, > without raising an error nor emiting an error. Example: > > $ python -Wd -c 'print "Hello"; "Wor

Re: [Python-Dev] The end of 2.7

2013-04-06 Thread Raymond Hettinger
r updates". Future point releases probably ought to occur "on their own schedule" whenever there are a sufficient number of changes to warrant a release, or an important security fix, or whenever the release managers have time. Raymond -- PYTHON 2.7 I'm not dead! CA

[Python-Dev] Best practices for Enum

2013-05-12 Thread Raymond Hettinger
ty by being used for every problem, the tall and small, even where it is not needed at all. my-two-cents-ly yours, Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://ma

Re: [Python-Dev] Best practices for Enum

2013-05-13 Thread Raymond Hettinger
On May 12, 2013, at 8:26 PM, Eli Bendersky wrote: > Thanks for the insights, Raymond. I don't think anyone is planning on rushing > anything. We still have to get the enum module itself committed and a serious > review process has just started for that, so it will take time. &

Re: [Python-Dev] More compact dictionaries with faster iteration

2013-05-18 Thread Raymond Hettinger
On May 15, 2013, at 4:32 AM, Christian Tismer wrote: > What is the current status of this discussion? > I'd like to know whether it is a considered alternative implementation. As far as I can tell, I'm the only one working on it (and a bit slowly at that). My plan is to implement it for frozens

Re: [Python-Dev] Purpose of Doctests [Was: Best practices for Enum]

2013-05-18 Thread Raymond Hettinger
sts to see if the conversion was successful). Raymond P.S. Breaking doctests should also be seen as a "canary in a coal mine." When they break, it also means that printed examples are out of date, that code parsers may break, that diffs start being different, that programs that feed into

[Python-Dev] Putting the Mac Build in the Apple App Store

2013-06-03 Thread Raymond Hettinger
it will help. If we were in the app store, installation and upgrade would be a piece of cake. Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

Re: [Python-Dev] cpython (2.7): Fix comment blocks. Adjust blocksize to a power-of-two for better divmod

2013-06-23 Thread Raymond Hettinger
ters too, so with the > original BLOCKLEN value of 62, sizeof(block) would be 64 times > sizeof(PyObject *). In the Py3 version of the source there's even a > comment explaining this right before the #define BLOCKLEN. Raymond, > can you explain? I also tried to fix that comment

Re: [Python-Dev] cpython (2.7): Fix comment blocks. Adjust blocksize to a power-of-two for better divmod

2013-06-23 Thread Raymond Hettinger
hat you guys what, then leave the code as is (with an incorrect comment, a blocklen that is unfavorable to indexing, and a struct order that doesn't exploit cache locality by following the natural access patterns in the code). I understand that the code for Py2.7 is sensitive and understand if

Re: [Python-Dev] cpython (2.7): Fix comment blocks. Adjust blocksize to a power-of-two for better divmod

2013-06-24 Thread Raymond Hettinger
it made the division and modulo calculation in deque_index() slower than for a power of two. > For this specific case, I "hope" that nobody relies on the exact BLOCK > structure (since it is a private structure). I don't know what you're talking about. This

Re: [Python-Dev] cpython (2.7): Fix comment blocks. Adjust blocksize to a power-of-two for better divmod

2013-06-25 Thread Raymond Hettinger
On Jun 24, 2013, at 10:12 PM, Benjamin Peterson wrote: > Raymond, go ahead and reapply your change. If you don't mind, I think you should be the one to undo your own reversions. Thank you, Raymond ___ Python-Dev mailing list Python-Dev@py

Re: [Python-Dev] lament for the demise of unbound methods

2013-07-06 Thread Raymond Hettinger
On Jul 4, 2013, at 2:34 AM, Brett Cannon wrote: > The loss of the ability to figure out the class from an unbound method seems > quite an annoying step back from an introspection point of view. > > It's only annoying if you take the perspective that methods are somehow > special compared to f

Re: [Python-Dev] PLY in stdlib (was cffi in stdlib)

2013-07-14 Thread Raymond Hettinger
up a whole new world to some users and be the basis for tool generation for others. Raymond ___ 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/

[Python-Dev] Building a Faster Python

2013-07-21 Thread Raymond Hettinger
. Raymond --- PYBENCH 2.0 --- * using CPython 2.7.5+ (2.7:f8df7c50132f, Jul 21 2013, 15:57:46) [GCC 4.2.1 (Based on Apple Inc. build 5658

Re: [Python-Dev] Building a Faster Python

2013-07-21 Thread Raymond Hettinger
On Jul 21, 2013, at 5:32 PM, Ned Deily wrote: > In article <252c50d8-c23d-438d-bae1-b22e0d65a...@gmail.com>, > Raymond Hettinger wrote: >> Our current Mac OS X builds use GCC-4.2. >> >> On Python2.7, I ran a comparison of gcc-4.2.1 builds >> versus gcc-4.8

Re: [Python-Dev] objections to renaming enumobject.h/c in 3.4?

2013-08-02 Thread Raymond Hettinger
itself has enums and there has never been any confusion with the enumerate iterator. Raymond ___ 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] cpython: Use a known unique object for the dummy entry.

2013-08-19 Thread Raymond Hettinger
> The most reasonable thing to do would probably be to share the same > dummy object between setobject.c and dictobject.c, then. > Raymond, it would be nice if you could take a look! Thanks, I will look at it shortly. Raymond On Sun, Aug 18, 2013 at 11:46 AM, Antoine Pitrou wrote:

Re: [Python-Dev] Add a "transformdict" to collections

2013-09-10 Thread Raymond Hettinger
On Sep 10, 2013, at 4:28 AM, Antoine Pitrou wrote: > In http://bugs.python.org/issue18986 I proposed adding a new mapping > type to the collections module. I would *really* like for this to start outside the standard library. It needs to mature with user feedback before being dumped in the coll

[Python-Dev] Compiler for the Mac OS X version of Python 3.4

2013-09-14 Thread Raymond Hettinger
at is just an artifact of continuing to do what we've always been doing. Raymond ___ 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

Re: [Python-Dev] Compiler for the Mac OS X version of Python 3.4

2013-09-14 Thread Raymond Hettinger
ild with better tools. That would let us find out early whether the worries and fears are real and will manifest themselves in practice. I've been building under GCC 4.8.1 for months and have encountered no problems at all with the popular third-party mod

Re: [Python-Dev] PEP 453 (pip bootstrapping) ready for pronouncement?

2013-09-27 Thread Raymond Hettinger
hat this will be a big step forward for Python usability. Raymond ___ 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] PEP 455: TransformDict

2013-10-04 Thread Raymond Hettinger
On Sep 22, 2013, at 6:16 PM, Ethan Furman wrote: > Are we close to asking for pronouncement? When you're ready, let me know. In the meantime, I conducting usability tests on students in Python classes and researching how well it substitutes for existing solutions for case insensitive diction

Re: [Python-Dev] PEP 455: TransformDict

2013-10-04 Thread Raymond Hettinger
ings. All I have to go on is that I personally think the TransformDict is a cool idea. However, that alone isn't sufficient for accepting the PEP. Raymond “… in order to get things merged you need to solve not only just your own problem but also realize that the world is bigger than yo

Re: [Python-Dev] PEP 455: TransformDict

2013-10-04 Thread Raymond Hettinger
On Oct 4, 2013, at 2:14 PM, Antoine Pitrou wrote: > I think "usability tests" should be conducted on people who actually > have a need for the API. Otherwise they simply don't make sense: if you > don't need an API, then you don't have to learn / understand it either. You're right. Students do

Re: [Python-Dev] Optimization

2013-10-05 Thread Raymond Hettinger
On Oct 5, 2013, at 12:42 PM, Serhiy Storchaka wrote: > Please remember me, what was common decision about CPython-only optimizations > which change computation complexity? IIRC, it is okay optimize C code for just about anything, but we don't want to alter the pure python code after from idiom

Re: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

2013-10-12 Thread Raymond Hettinger
on. The incessant sniping is demoralizing. The module maintainer (Nick) approved the name change from his original preference for ignored(). That should had been the end of it. Now, this thread has 40+ emails and it will probably go on for days. Raymond __

Re: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

2013-10-12 Thread Raymond Hettinger
On Oct 12, 2013, at 4:30 PM, Ethan Furman wrote: >> >> When you ask someone to describe what >> "try: f() except SomeException: pass" does, >> they will say that it ignores the exception. > > And they would be right in that case. > > >> FWIW, I presented this to 2500+ people in the keynote >

Re: [Python-Dev] Checking in Argument Clinic early?

2013-10-15 Thread Raymond Hettinger
is a good plan. "Letting it bake" means we get more of a chance to interact with it and you will give more of a chance to make refinements. Raymond ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python

Re: [Python-Dev] cpython: Rename contextlib.ignored() to contextlib.ignore().

2013-10-16 Thread Raymond Hettinger
@contextmanager def ignored(*exceptions): try: yield except exceptions: pass Raymond P.S. The name suppress() is not as good as ignore(), but I'm so burnt out on this thread that I j

Re: [Python-Dev] PEP: Ordered Class Definition Namespace

2016-06-07 Thread Raymond Hettinger
erved in ``type.__definition_order__``. This allows > introspection of the original definition order, e.g. by class decorators. I'm unclear on why this would be needed. Wouldn't the OrderedDict be sufficient for preserving definition order? Raymond __

Re: [Python-Dev] PEP: Ordered Class Definition Namespace

2016-06-07 Thread Raymond Hettinger
yDict_* APIs on tp_dict, so replacing the latter with a subclass is > neither trivial nor particularly safe in the presence of extension > modules). That makes sense. +1 all around. Raymond ___ Python-Dev mailing list Python-Dev@python.org ht

Re: [Python-Dev] Compact dict implementations (was: PEP 468

2016-06-18 Thread Raymond Hettinger
ussion, PyPy implemented the idea for dicts and achieved some nice improvements. So, I think Inada Naoki is going in the right direction by focusing on compact dicts. Raymond ___ Python-Dev mailing list Python-Dev@python.org https://mail.python

Re: [Python-Dev] JUMP_ABSOLUTE in nested if statements

2016-06-18 Thread Raymond Hettinger
compile.c and Python/peephole.c. The compile.c code generated opcodes in the most straight-forward way possible and then the peephole optimizer gets some of the low-hanging fruit by making a few simple transformations. Raymond AST generated code before peephole optimization ---

Re: [Python-Dev] PEP 487: Simpler customization of class creation

2016-06-20 Thread Raymond Hettinger
ort and without much of a performance hit. IIRC, it involved using a ConcurrentHashMap augmented by an auxiliary 2-by-n-row array of indices (one for forward links and the other for backward links). There was also need to add a reentrant lock around the mutating methods. Raymond Hettinger

Re: [Python-Dev] PEP 487: Simpler customization of class creation

2016-06-21 Thread Raymond Hettinger
Additional logic was needed to preserve order for interleaved insertions and deletions. Raymond ---(PyPy test of order preservation)- 'Demonstrate PyPy preserves order across repeated insertions and deletions' fr

<    1   2   3   4   5   6   7   8   9   10   >