Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend pre-allocated integers to cover [0, 255] #42933

Closed
tcdelaney mannequin opened this issue Feb 21, 2006 · 5 comments
Closed

Extend pre-allocated integers to cover [0, 255] #42933

tcdelaney mannequin opened this issue Feb 21, 2006 · 5 comments
Assignees
Labels
type-feature A feature request or enhancement

Comments

@tcdelaney
Copy link
Mannequin

tcdelaney mannequin commented Feb 21, 2006

BPO 1436243
Nosy @birkenfeld, @rhettinger, @terryjreedy

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2006-02-22.18:04:10.000>
created_at = <Date 2006-02-21.22:43:30.000>
labels = ['type-feature']
title = 'Extend pre-allocated integers to cover [0, 255]'
updated_at = <Date 2006-02-22.18:04:10.000>
user = 'https://bugs.python.org/tcdelaney'

bugs.python.org fields:

activity = <Date 2006-02-22.18:04:10.000>
actor = 'terry.reedy'
assignee = 'georg.brandl'
closed = True
closed_date = None
closer = None
components = ['None']
creation = <Date 2006-02-21.22:43:30.000>
creator = 'tcdelaney'
dependencies = []
files = []
hgrepos = []
issue_num = 1436243
keywords = []
message_count = 5.0
messages = ['54735', '54736', '54737', '54738', '54739']
nosy_count = 4.0
nosy_names = ['georg.brandl', 'rhettinger', 'terry.reedy', 'tcdelaney']
pr_nums = []
priority = 'normal'
resolution = 'accepted'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue1436243'
versions = []

@tcdelaney
Copy link
Mannequin Author

tcdelaney mannequin commented Feb 21, 2006

When the bytes object is introduced (successor to
PEP-332) the full range of byte integer objects [0,
255] are likely to be used more commonly.

Suggest extending the pre-allocated integer obejcts to
include the full range [0, 255].

@tcdelaney tcdelaney mannequin closed this as completed Feb 21, 2006
@tcdelaney tcdelaney mannequin assigned birkenfeld Feb 21, 2006
@tcdelaney tcdelaney mannequin added the type-feature A feature request or enhancement label Feb 21, 2006
@rhettinger
Copy link
Contributor

Logged In: YES
user_id=80475

Georg, would you take care of this one for Py2.5.
Also include the value 256.

@terryjreedy
Copy link
Member

Logged In: YES
user_id=593130

I decided to test out the new svn view facility ;-)

Looks like 100 in
#define NSMALLPOSINTS		100
in python/trunk/Objects/intobject.c
just needs to be upped to 257

Unlike for other builtin types, I could not find a
Lib/test/test_int.py file or equivalent where ints are
tested, to see if pre-allocation is tested. What did I
miss?

@birkenfeld
Copy link
Member

Logged In: YES
user_id=849994

It's test_types, and I added a test too.

Revision 42552.

@terryjreedy
Copy link
Member

Logged In: YES
user_id=593130

Thanks for the info.  Small nit: your checkin message says
"RFE python/cpython#42933: make integers in [0..256] preallocated. "
The range is actually (now)[-5...256].
#define NSMALLNEGINTS		5
sets the lower limit (unchanged).

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants