How can i use a variable without define it ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • zhw

    How can i use a variable without define it ?

    How can i use a variable without define it ?

    I have thought about the __import__ function, but the docs says "the
    __import__() function does not set the local variable named eggs"$B!#(B

  • Ben Finney

    #2
    Re: How can i use a variable without define it ?

    zhw <weizhonghua.at i@gmail.comwrit es:
    How can i use a variable without define it ?
    What do you mean by "use"? That's so vague I can think of many
    possible interpretations .

    What do you mean by "variable"? That term carries a lot of baggage
    that doesn't apply in Python.

    Can you give a small, complete example that demonstrates the issue
    you're trying to solve?

    --
    \ “The face of a child can say it all, especially the mouth part |
    `\ of the face.” —Jack Handey |
    _o__) |
    Ben Finney

    Comment

    • Ben Finney

      #3
      Re: How can i use a variable without define it ?

      zhw <weizhonghua.at i@gmail.comwrit es:
      On 7月16日, 下午5时35分 , Ben Finney <bignose+hate s-s...@benfinney. id.au>
      wrote:
      What problem are you trying to solve?
      >
      I an sorry, I can't tell you.
      Perhaps I'm not being clear: What *programming* problem are you trying
      to solve?

      I ask because it seems you are focussed to much on some specific
      method, when it is very likely that your problem is better solved
      using different methods.
      If you can't give a solution, just ignore it!
      I *did* give a solution. If that doesn't work for you, please tell us
      more about the problem so we can provide better solutions.

      --
      \ “Say what you will about the Ten Commandments, you must always |
      `\ come back to the pleasant fact that there are only ten of |
      _o__) them.” —Henry L. Mencken |
      Ben Finney

      Comment

      • Tim Roberts

        #4
        Re: How can i use a variable without define it ?

        zhw <weizhonghua.at i@gmail.comwrot e:
        >Ben Finney <bignose+hate s-s...@benfinney. id.auwrote:
        >>
        >What problem are you trying to solve?
        >
        >I an sorry, I can't tell you.
        That's nonsense. No one is asking you to reveal the design of your
        company's next product. However, you have some overall problem you are
        trying to solve, and you have focused in on one POSSIBLE solution. Instead,
        tell us about the PROBLEM, and we'll offer good solutions.
        >If you can't give a solution, just ignore it!
        NO ONE will be able to give you a solution, because you have not described
        the problem.
        --
        Tim Roberts, timr@probo.com
        Providenza & Boekelheide, Inc.

        Comment

        Working...