[Uml-devel] [Bug 109909] New: python code generation missing class attributes, init code.

Charles Phoenix phoenixreads at sympatico.ca
Sun Jul 31 02:14:14 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=109909         
           Summary: python code generation missing class attributes, init
                    code.
           Product: umbrello
           Version: 1.4.2
          Platform: unspecified
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: umbrello-devel.kde.org
        ReportedBy: phoenixreads sympatico ca


Version:           1.4.2 (using KDE 3.4.2, Gentoo)
Compiler:          gcc version 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)
OS:                Linux (i686) release 2.6.11-gentoo-r11

missing elements. 

1) no class attributes generated. Attributes would be
Class MyClass:
    public_attribute =
    _protected_attribute =
    __private_attribute =

default values would most likely be None, unless otherwise specified

an option? to include getters and setter functions for protected and private attributes. It is closer to pure OOP and allows for better transition to another OOP language. e.g., python prototyping -> CPP



2) no class attribute documentation generated. Documentation would be something like...

Class MyClass:
'''
....

Attributes
'''

unless there is an appropriate keyword.






3) Class missing...
if __name__=='__main__':
    MyClass()

This is a very common methodology, especially in testing, perhaps another option?


4) Subclasses missing  the init function...
    def __init__(self, foobar):
        Super.__init__(self, foobar)

Again optional but there is a greater than 50% chance I would call the superclass.




More information about the umbrello-devel mailing list