Classic OOP in Python
Cousin Stanley
cousinstanley at gmail.com
Thu Jun 18 11:10:53 EDT 2015
> ....
> python -m doctest application.py
>
> And from there, I would build up extra doc tests
> ....
An extra doc test ....
that fails ....
#!/usr/bin/env python
"""
NewsGroup .... comp.lang.python
Subject ...... Classic OOP in Python
Date ......... 2015-06-17
Post_By ...... Steven D'Aprano
Edit_By ...... Stanley C. Kitching
"""
def bracket( s ) :
"""Return string s bracketed in parentheses.
>>> bracket( "Hello" )
'(Hello)'
>>> bracket( "Yo Mama is a Perl Monkey" )
'(Yo Mama is a Java Monkey')
"""
return "(%s)" % s
--
Stanley C. Kitching
Human Being
Phoenix, Arizona
More information about the Python-list
mailing list