Standalone Python functions in UML?

bruno at modulix onurb at xiludom.gro
Wed Apr 5 05:08:28 EDT 2006


Philippe Martin wrote:
<meta> please don't top-post - corrected</meta>

> bruno at modulix wrote:
> 
> 
>>Philippe Martin wrote:
>>
>>>Roman Susi wrote:
>>>
>>
>>(snip)
>>
>>
>>>>More theoretical question is if I create classes on the fly, how UML can
>>>>reflect that?
>>>
>>>
>>>You mean objects I think:
>>
>>Yes : class objects !-)
>>
>>Python's classes *are* objects. And you can create new classes at runtime.
>>
>>(snip)
> 
> But not in UML: a class diagram will represent classes while a sequence
> diagram objects.

Yes, there's in UML a fundamental distinction between classes and
objects - distinction that does not exist in a lot of OO languages. This
greatly limits UML's usability for some common idioms in dynamic OOPL's.
Seems like UML has been designed to express only the restricted subset
of OO supported by rigid static languages like C++, Java and ADA.

My 2 cents
-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list