Commits

Philip Jenvey  committed 6e758a2

kill long's suffix support

  • Participants
  • Parent commits cb82d91
  • Branches py3k

Comments (0)

Files changed (2)

File pypy/objspace/std/strutil.py

 
 @enforceargs(unicode, None, None)
 def string_to_bigint(s, base=10, parser=None):
-    """As string_to_int(), but ignores an optional 'l' or 'L' suffix
-    and returns an rbigint."""
+    """As string_to_int() but returns an rbigint."""
     if parser is None:
         s = literal = strip_spaces(s)
-        if (s.endswith(u'l') or s.endswith(u'L')) and base < 22:
-            # in base 22 and above, 'L' is a valid digit!  try: long('L',22)
-            s = s[:-1]
         p = NumberStringParser(s, literal, base, u'int')
     else:
         p = parser

File pypy/objspace/std/test/test_longobject.py

         assert type(b) is int
 
     def test_long_from_unicode(self):
+        raises(ValueError, int, '123L')
+        assert int('L', 22) == 21
         s = '\U0001D7CF\U0001D7CE' # 𝟏𝟎
         assert int(s) == 10