[issue11846] Remove non-guaranteed implementation details from docs.

2019-08-22 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The current wording seems to have sufficed for users of the C API.  Also, it is 
an implementation detail subject to change.  Discussions on being able to 
mutate anything in C are covered in the ctypes module.

--
resolution: accepted -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11846] Remove non-guaranteed implementation details from docs.

2011-04-25 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The range of interned ints was once much smaller, but it was expanded upwards 
to 256 so that the bytes extracted from bytes and bytearray objects, as when 
indexing or iterating, would *all* be pre-allocated objects. I should presume 
that their indexers and iterators are cognizant of this and take advantage of 
this to bypass int() creation and directly index into the the array of 
preallocated ints without a range check.

As for space and some time saving, just on startup,
a nearly fresh IDLE shell shows

 sum((sys.getrefcount(i) for i in range(-5, 257)))
4432

There are hundreds of references for each of 0 and 1.

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11846
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11846] Remove non-guaranteed implementation details from docs.

2011-04-24 Thread Ned Batchelder

Changes by Ned Batchelder ned...@users.sourceforge.net:


--
nosy: +nedbat

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11846
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11846] Remove non-guaranteed implementation details from docs.

2011-04-21 Thread Anthony Long

Anthony Long antl...@gmail.com added the comment:

I'll have a doc patch shortly.

Also, I am working on defining a solid range. Memory is not an issue like it 
was back in 1991 when this range was originally implemented, so we can go 
higher and get a bigger performance boost. This will be very important (to 
some, admittedly) in Python 3, where there is no distinction between PyInts and 
PyLongs (more processing req'd), which could benefit from further optimization 
of the range.

Going to be doing benchmarking, -256 to 256 seems like a good place to start. 
If anyone has app's i should benchmark with in mind, feel free to let me know.

--
resolution:  - accepted
title: Implementation question for (-5) - 256 caching, and doc update for 
c-api/int.html - Remove non-guaranteed implementation details from docs.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11846
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11846] Remove non-guaranteed implementation details from docs.

2011-04-21 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

 Memory is not an issue like it was back in 1991 when 
 this range was originally implemented, so we can go 
 higher and get a bigger performance boost.

Please don't do this.  Memory is still important to a lot of people.  Also, 
there is *very* little payoff for numbers outside the -5 to 256 range.

If we're to spend memory, we can do it in other places (like bigger freelists 
or somesuch).

 We should remove the documentation entries that discuss 
 non-guaranteed implementation details

FWIW, I've changed my thinking on this.  With documentation, these details are 
very difficult to find-out about.  Instead of removing them, they should be 
marked as non-guaranteed implementation specific details or they can be moved 
to a separate section.

--
assignee:  - rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11846
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11846] Remove non-guaranteed implementation details from docs.

2011-04-21 Thread Anthony Long

Anthony Long antl...@gmail.com added the comment:

My plan is to document it, as it exists, in the current implementation. That's 
a start atleast, and will provide an entry point for further documentation in 
the future should it be changed again.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11846
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com