"Robert Klemme" <bob.news / gmx.net> wrote

>
> >     silly_example will not have other access to x, y
> >     (*: since you did: str=str.to_str; count=count.to_int)
>
> Wrong, because to_str need not create a new instance:

Misunderstanding. What I meant was, because your semantics are:
    def f (str.to_str, count.to_int)
        ...body
is behaviorally the same as
    def f (str, count)
        str = str.to_str
        count = count.to_int
        ...body
you no longer have access to the original caller's values of str, count
within the body of f (which is why I presented it with x, y) .

Hth.