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
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
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 !-)
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
17 matches
Mail list logo