Re: Standalone Python functions in UML?

2006-04-05 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Roman Susi wrote: Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? I just create a (UML) class for modules. After all a Python module can be seen as a class definition for a singleton which is instantiated at

Re: Standalone Python functions in UML?

2006-04-05 Thread bruno at modulix
Ravi Teja wrote: (snip) And probably Python is too dynamic for UML. That is another reason rountrip tools aren't there. As you probably already know, UML diagrams are structural and behavioural (plus interactional with 2.0). Round trip tools only model structural diagrams. Python is

Re: Standalone Python functions in UML?

2006-04-05 Thread bruno at modulix
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 !-)

Re: Standalone Python functions in UML?

2006-04-05 Thread Ravi Teja
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

Re: Standalone Python functions in UML?

2006-04-05 Thread Ben Sizer
Ravi Teja wrote: What I mean is utility is the formal notation for a class in which global functions are aggregated. It's not a hack. Python is not alone here. Most OO languages aside Java and Smalltalk have functions outside classes and UML accomodates though not encourages free functions.

Re: Standalone Python functions in UML?

2006-04-05 Thread Nicola Musatti
Roman Susi wrote: [...] Also, my argument that Python is quite good at communicating design ideas is supported by the fact that Python developers do not use UML (or other modelling tools/languages) as often as say Java programmers, nor feel the need to. And probably Python is too dynamic for

Re: Standalone Python functions in UML?

2006-04-05 Thread Nicola Musatti
bruno at modulix wrote: [...] 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

Re: Standalone Python functions in UML?

2006-04-05 Thread Roman Susi
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Roman Susi wrote: Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? I just create a (UML) class for modules. After all a Python module can be seen as a class definition for

Standalone Python functions in UML?

2006-04-04 Thread Roman Susi
Hi! Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? More theoretical question is if I create classes on the fly, how UML can reflect that? (I know that Python code itself is best at communication design ideas, but there are some

Re: Standalone Python functions in UML?

2006-04-04 Thread Ravi Teja
Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? As a utility class. More theoretical question is if I create classes on the fly, how UML can reflect that? On the fly usually means at runtime. I guess you mean if you change code will

Re: Standalone Python functions in UML?

2006-04-04 Thread Rob Cowie
Roman Susi wrote: Hi! Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? I would say that within a class diagram, you can't. In other UML diagrams (such as sequence interaction), the function is simply used as if it were a method

Re: Standalone Python functions in UML?

2006-04-04 Thread Philippe Martin
Roman Susi wrote: Hi! Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? I'm not up to par on the latest UML specs (or not too old) - but I don't believe UML handles that: it is called a class diagram after all. More theoretical

Re: Standalone Python functions in UML?

2006-04-04 Thread bruno at modulix
Ravi Teja wrote: (snip) More theoretical question is if I create classes on the fly, how UML can reflect that? On the fly usually means at runtime. I guess you mean if you change code will my diagram stay in sync?. Nope, the OP really meant on the fly, as in at runtime. In python, it is

Re: Standalone Python functions in UML?

2006-04-04 Thread bruno at modulix
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) -- bruno

Re: Standalone Python functions in UML?

2006-04-04 Thread Roman Susi
Ravi Teja wrote: Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? As a utility class. So, function could be a utility class method. If there are no better ways. More theoretical question is if I create classes on the fly, how UML

Re: Standalone Python functions in UML?

2006-04-04 Thread Philippe Martin
But not in UML: a class diagram will represent classes while a sequence diagram objects. Philippe 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

Re: Standalone Python functions in UML?

2006-04-04 Thread Ravi Teja
So, function could be a utility class method. If there are no better ways. What I mean is utility is the formal notation for a class in which global functions are aggregated. It's not a hack. Python is not alone here. Most OO languages aside Java and Smalltalk have functions outside classes and