Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Add attributes to function in python

    General and Desktop
    2
    2
    637
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Ravi_exact last edited by

      Hi,

      I would like to add some descriptions to functions on top of every function

      ex :

      [Name = 'Test menu', Default=True, etc..]
      def test():
      pass

      My actual scenario is , I create Menus dynamically by reading all methods from a module at run time.

      So i don't want to take menu name as test, i want user to provide menu name on his wish in "Name" attribute of a function. There will be more attribute, not only Name.
      Is there any possibility in python, please anyone guide me ?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        This question is not Qt related, you should ask it on a python forum.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post