[code.view]

[top] / python / PyMOTW / doctest / doctest_ellipsis.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2010 Doug Hellmann.  All rights reserved.
     #
     """Ignoring part of the verification value with ELIPSIS
     """
     #end_pymotw_header
     
     class MyClass(object):
         pass
     
     def unpredictable(obj):
         """Returns a new list containing obj.
     
         >>> unpredictable(MyClass()) #doctest: +ELLIPSIS
         [<doctest_ellipsis.MyClass object at 0x...>]
         """
         return [obj]
     

[top] / python / PyMOTW / doctest / doctest_ellipsis.py

contact | logmethods.com