Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(168369)

#22184: lrucache should reject maxsize as a function

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 4 months ago by jaraco
Modified:
5 years, 4 months ago
Reviewers:
storchaka
CC:
rhettinger, jaraco, jwilk_jwilk.net, devnull_psf.upfronthosting.co.za, storchaka
Visibility:
Public.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/functools.py View 1 chunk +6 lines, -0 lines 1 comment Download
Lib/test/test_functools.py View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 1
storchaka_gmail.com
5 years, 4 months ago #1
http://bugs.python.org/review/22184/diff/12696/Lib/functools.py
File Lib/functools.py (right):

http://bugs.python.org/review/22184/diff/12696/Lib/functools.py#newcode398
Lib/functools.py:398: if not isinstance(maxsize, int):
maxsize can be None.

And may be accept any integer-like object (this would be consistent with
handling similar arguments in C implementations)?

if maxsize is not None:
    maxsize = operator.index(maxsize)

It would be good also specify the behavior when maxsize < 0.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+