Kaydet (Commit) aa306692 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

correct changed import

üst 6c940d61
...@@ -118,10 +118,10 @@ The use of dynamic dispatching by :meth:`Repr.repr1` allows subclasses of ...@@ -118,10 +118,10 @@ The use of dynamic dispatching by :meth:`Repr.repr1` allows subclasses of
the handling of types already supported. This example shows how special support the handling of types already supported. This example shows how special support
for file objects could be added:: for file objects could be added::
import repr import reprlib
import sys import sys
class MyRepr(repr.Repr): class MyRepr(reprlib.Repr):
def repr_file(self, obj, level): def repr_file(self, obj, level):
if obj.name in ['<stdin>', '<stdout>', '<stderr>']: if obj.name in ['<stdin>', '<stdout>', '<stderr>']:
return obj.name return obj.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment