Standalone Python functions in UML?

Ravi Teja webraviteja at gmail.com
Wed Apr 5 06:03:55 EDT 2006


> Well, you can have a lot of things happening during the import stage. Is
this 'runtime' or not ?-)

Runtime.

> And you can actually *create* (not 'change') classes at runtime too.

Yes sir! By now I am quite well aware what 'dynamic typing' means. Once
again, round trip tools today model program structure/code/text, not
runtime magic - all the stuff a dynamically typed language such as
Python does differently from statically typed languages like Java. So
this does not affect them much.

Languages like Python with metaclasses and other dynamic aspects do
present an interesting case for modelling but what I am talking about
is round trip tools, not the full scope of modelling and UML. Round
trip implementations today get at class and package diagrams
(structural), not object diagrams and collaboration diagrams. Class and
Package diagrams are concerned with the layout, not intricate runtime
behaviour, mutations and mutilations of classes and packages. That
would be the domain of behavioural diagrams of which I made no
assertions. There isn't much magical about Python as far as code layout
is concerned. Metaclasses can for example change the very behaviour of
the class construct but modelling that is not the purpose of a class or
package diagram.

Rather than going hypothetical and us miscommunicating in the abstract
plane, could you just tell me why you could not draw a class or package
diagram for your last project? That will probably make me see what I am
missing from your points.




More information about the Python-list mailing list