Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53543 > unrolled thread
| Started by | Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> |
|---|---|
| First post | 2013-09-03 05:18 +0430 |
| Last post | 2013-09-03 11:07 +1000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
problem of double import in python Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-09-03 05:18 +0430
Re: problem of double import in python alex23 <wuwei23@gmail.com> - 2013-09-03 11:07 +1000
| From | Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> |
|---|---|
| Date | 2013-09-03 05:18 +0430 |
| Subject | problem of double import in python |
| Message-ID | <mailman.526.1378169302.19984.python-list@python.org> |
Dear all, I remember to avoiding to confusing compiler for header, use ///////////////// // in my include file #define MYHEADER_H // and in others code use: #ifndef MYHEADER_H #include blahblah ///////////////////////// Unfortunately, i prevent to same error, double import to python, but i don't know how to solve, Even i don't know policy of python programmers. You'll make me happy if explain me... Yours, Mohsen
[toc] | [next] | [standalone]
| From | alex23 <wuwei23@gmail.com> |
|---|---|
| Date | 2013-09-03 11:07 +1000 |
| Message-ID | <l03cpb$49r$1@dont-email.me> |
| In reply to | #53543 |
On 3/09/2013 10:48 AM, Mohsen Pahlevanzadeh wrote: > Unfortunately, i prevent to same error, double import to python, but i > don't know how to solve, Even i don't know policy of python programmers. You don't need to do anything, Python takes care of this for you. During execution, a module is only loaded the first time it is imported. Every following import will notice that it has already been loaded and return a reference to the module instead.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web