[C++-sig] Re: return_self_policy / return_arg
Nikolay Mladenov
nickm at sitius.com
Fri Jun 27 22:46:19 CEST 2003
Posting again
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20030627/934def4a/attachment.html>
-------------- next part --------------
'''
>>> from return_self import *
>>> l1=Label()
>>> l1 is l1.label("bar")
1
>>> l1 is l1.label("bar").sensitive(0)
1
>>> l1.label("foo").sensitive(0) is l1.sensitive(1).label("bar")
1
>>> return_arg is return_arg(return_arg)
1
'''
def run(args = None):
import sys
import doctest
if args is not None:
sys.argv = args
return doctest.testmod(sys.modules.get(__name__))
if __name__ == '__main__':
print "running..."
import sys
sys.exit(run()[0])
-------------- next part --------------
A non-text attachment was scrubbed...
Name: return_self.cpp
Type: application/x-unknown-content-type-cppfile
Size: 1400 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20030627/934def4a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: return_self_policy.hpp
Type: application/x-unknown-content-type-hppfile
Size: 2538 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20030627/934def4a/attachment-0001.bin>
More information about the Cplusplus-sig
mailing list