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
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
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
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
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
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
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
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
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
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
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
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
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-
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
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
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', '
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
> 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
__(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
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
> 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
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
> 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
'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
> 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
_
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
___
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/
> 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
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
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
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
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 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
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
__
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
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
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
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
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
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.
. 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
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
> 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
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
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.
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
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
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
>>&
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
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
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
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
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
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 %
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
> 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.
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
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 --
> 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.
>
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
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
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
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
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
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
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
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
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
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.
&
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
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
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
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
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
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
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
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
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/
.
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
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
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
> 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:
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
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
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
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
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
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
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
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
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
__
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
>
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
@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
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
__
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
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
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 ---
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
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
101 - 200 of 1495 matches
Mail list logo