⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Add attributes to function in python

  • Hi,

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

    ex :

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

    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 ?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

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

Log in to reply