Storing Meta-data in python

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Heshan Suri
    New Member
    • Apr 2008
    • 6

    Storing Meta-data in python

    Is there a mechanism to express meta-data about classes, methods, variables and method parameters in python ( like annotations in java)? I will be thankful if anyone can point me to a sample code or a web reference.
  • Laharl
    Recognized Expert Contributor
    • Sep 2007
    • 849

    #2
    Look at pyDoc, it's a standard library module, and it's actually how the library is written online, just like Javadoc with the Java API. You can find tutorials on its use online.

    Comment

    • Heshan Suri
      New Member
      • Apr 2008
      • 6

      #3
      In javascript I'm used to associating metadata with a function as
      follows.

      foo.bar = "foobar";
      function foo(){
      }

      What's the normal python practice to do this kind of a thing. What's the
      python way of doing this.

      Comment

      Working...