#!/usr/bin/env python

# Hoi,

# lees a.u.b. verder ...

def functie1():
        """functie die zijn eigen doc string print"""
        print functie1.__doc__
        return

def functie2():
        """functie die doc string van andere functie print"""
        print functie1.__doc__
        return

def functie3(functienaam):
        """Wat ik zou willen"""
        print functienaam.__doc__
        return

def functie4(functienaam):
        """Mijn poging om voorbij 'str(object) -> string' te komen"""
        print repr(functienaam.__doc__)
        return

if __name__ == "__main__":
        functie1()
        functie2()
        functie3('functie2')
        #functie4('functie2')
output = """
functie die zijn eigen doc string print
functie die zijn eigen doc string print
str(object) -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
"""

vraag = """
Wat te doen om voorbij '''str(object) -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
''' te komen?
"""

# l l


Groeten
Geert Stappers
-- 
Leven en laten leven
_______________________________________________
Python-nl mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-nl

Antwoord per e-mail aan