473,382 Members | 1,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How can i use a variable without define it ?

zhw
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

Jul 16 '08 #1
3 1145
zhw <we*************@gmail.comwrites:
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
Jul 16 '08 #2
zhw <we*************@gmail.comwrites:
On 7月16日, 下午5时35分, Ben Finney <bignose+hates-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
Jul 16 '08 #3
zhw <we*************@gmail.comwrote:
>Ben Finney <bignose+hates-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, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 18 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Leo | last post by:
I have a member function in this class, which needs a variable to keep track its status. Thus I used a static member variable. But I encounter a "unresolved external variable" error during...
4
by: Dan Elliott | last post by:
Hello, Converting from a working C program to C++, I run into the following error: I have a header: (header.h) namespace shared{ ... struct X{ ...
134
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that...
1
by: S?ren Gammelmark | last post by:
Hi I have been searching the web and comp.lang.c of a method of using variable-argument function pointers and the like. And some of the questions arising in this post are answered partly in...
5
by: PCHOME | last post by:
Hello! I am working on dividing a single C file into several files. Now I encounter a problem about the global variables and can not find a way to solve it. All global variables and codes used...
23
by: Russ Chinoy | last post by:
Hi, This may be a totally newbie question, but I'm stumped. If I have a function such as: function DoSomething(strVarName) { ..... }
16
by: Jonathan.Fillion | last post by:
Ok, I have a simple problem and I might just be blind and not see the (possibly simple) solution to it. I want to declare variables while adding them to a list simultaneously. What I want to do is...
112
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
11
by: whirlwindkevin | last post by:
I saw a program source code in which a variable is defined in a header file and that header file is included in 2 different C files.When i compile and link the files no error is being thrown.How is...
2
by: sh.vipin | last post by:
Below is a piece of bit manipulation code. here in function "eval_output_out" there are some macros. Say we have to versions of the same code 1. variable "b" in "eval_output_out" is initialized...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.