1. yasirs
  2. pypy

Commits

Armin Rigo  committed 2e61f1a

What should UnicodeBuilder(-2) do?...

  • Participants
  • Parent commits bc2ecbb
  • Branches default

Comments (0)

Files changed (1)

File pypy/module/__pypy__/interp_builders.py

View file
 
 class W_UnicodeBuilder(Wrappable):
     def __init__(self, space, size):
-        if size == -1:
+        if size < 0:
             self.builder = UnicodeBuilder()
         else:
             self.builder = UnicodeBuilder(size)
     append_slice = interp2app(W_UnicodeBuilder.descr_append_slice),
     build = interp2app(W_UnicodeBuilder.descr_build),
 )
-W_UnicodeBuilder.typedef.acceptable_as_base_class = False
+W_UnicodeBuilder.typedef.acceptable_as_base_class = False