[EMAIL PROTECTED] wrote:
> Sometimes I must delete 2 very big directory's.
> The directory's have a very large tree with much small file's in it.
>
> So I use shutil.rmtree()
> But its to slow.
>
> Is there a faster method ?
Is os.system("rm -rf %s&quo
ding the widely-spread C and C++.
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
etc).
Such a module would be very useful, but I believe it's orthogonal to having an
infix notation for common operations. We have a string module (and string
methods), but we still have a couple of operators for strings like "+".
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
, if pkg3 uses pkg1, pkg1 shouldn't use pkg3. It makes sense to think
of pkg1 as the moral equivalent of a library, which pkg3 uses.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
al/bin which
adds /usr/local/myapp to sys.path[0], and "import main" to boot the
application.
I'm not sure I have answered your question though :)
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
;)
> subroot = SubElement(root, 'subroot', text='xyz')
No, this creates:
I believe the text ought to be set in a separate statement.
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
base-class classmethod to reuse its implementation, but I'd
like to pass the derived class as first argument.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
uld just call them by name and forget
> about super.) What is people's opinion on this? Does it make any
> sense?
I personally consider super a half-failure in Python. Some of my reasons are
cited here:
http://fuhm.org/super-harmful/
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
>> @classmethod
>> def foo(cls, a, b):
>> A.foo(cls, a, b) # WRONG!
>>
>> I need to call the base-class classmethod to reuse its
>> implementation, but I'd like to pass the derived class as first
>> argument. --
>> Giovanni B
nable. You
will end up always with objects with better semantic, and methods to modify
them. So in the end you will always have a reference to the moral equivalent of
a[42]["pos"], and that would be a well defined object with a method setThis()
which will modify the moral equivalent of [-4
[EMAIL PROTECTED] wrote:
> An early alpha-quality release is available at
> http://home.comcast.net/~casevh/
Given the module named "Decimal" in Python 2.4, I'd suggest you to rename
your library.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
optimization. Even without it, you can
still use "key":
>>> L = [[1,4],[3,9],[2,5],[3,2]]
>>> def mykey(e):
... return e[1]
...
>>> L.sort(key=mykey)
>>> L
[[3, 2], [1, 4], [2, 5], [3, 9]]
Using the "key" keyword argument can be easier to understand ("sorting
against the second element" == "second element is the key").
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
ble__ = True or something like that. Or at least, I'd
be grateful if someone explained me why this can't or shouldn't be done.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
s an
exception, rather than go unnoticed?
I don't see your point, either. Why would you want to add attributes to an
object documented to be immutable?
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
es a way to
behave like builtins, eg. explicitally and fully implement immutability.
Immutability is an important concept in Python programs, and I'm impressed it
does not have explicit support.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
#x27;t Python give
me some way to enforce this so that, if I or some other dev do the mistake, it
doesn't go unnoticed?
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
tyles.
> I'm not sure it's more important than
> things like interned strings and the sharing of small integers. Most
> of the discussion of immutables here seems to be caused by newcomers
> wanting to copy an idiom from another language which doesn't have
> immutable variables. Their real problem is usually with binding, not
> immutability.
I'm not such a newcomer, but (how funny) Python is *the* language that
introduced me to the concept of immutable objects and their importance in
design :)
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
psulation with Python's immutable types,
> which are immutable because the implementation demands it. (A fact I
> hope will disappear at some point.)
You seriously believe that strings, integers and tuples are immutable because
of implementation details? I believe they are part of a language design -- and
a good part of it.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
information. So why trying so hard to get into
trouble?
> It sounds like what you may want are opaque objects where you can
> control access better
No that's a different issue. One example of my immutable classes is Point2D
(two attributes: x/y). Having it immutable gives it many useful properties,
such as a real value semantic.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
instances, at least under some
> conditions. There are no constructs for helping you do that with
> user-defined objects. Should we add them for the sake of
> orthogonality? I don't think so - not without a good use case.
I don't think identity is important for immutable obj
Paul Rubin wrote:
> "Giovanni Bajo" <[EMAIL PROTECTED]> writes:
[pay attention to the quoting, I didn't write that :) ]
>>> Mike Meyer wrote:
>>>
>>> However, when you prevent a client from adding an attribute, you're
>>> not me
be key dictionaries (with their hash value being their id).
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
rg2, arg3, arg4, abc=0,
foo=1, bar="hello"))
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
have methods that A
doesn't. Then, add those methods to A too, but not implement them:
def foo(self):
"""Foo this and that. Must be implemented in subclasses."""
raise NotImplementedError
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
in32-py2.4.exe
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
lications:
http://www.pygame.org/
Then you can use pywin32 (http://sourceforge.net/projects/pywin32) to bind
to the Windows API and accomplish what you need.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
xternal libraries for specific purposes, but I'd rather the standard
library to stay focused on provided a possibly restricted set of common
features with a decent interface/implementation.
This said, I'd also like to see ElementTree in the standard library. We already
have a SAX and
Giovanni Bajo wrote:
> One thing I really fear about the otherwise great EasyInstall (and
> Python Eggs) is that we could forget about...
... how important is to have a standard library. The fact that it's easy to
install external modules shouldn't make us drop the standard lib
: "self.kProgress1 =
> KProgress(self,"kProgress1") NameError: global name 'KProgress' is not
> defined").
> Are the not implemented there or I should install some additional
> software?
PyKDE.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
anything wrong in providing an abstraction for this,
especially since we already decided that set-like abstractions are useful.
So, FWIW, I would find set-like operations on dictionaries an useful addition
to Python. Besides, I guess they can be easily experimented and studied by
subclassing dict.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
itting out the CJK codecs.
Thanks,
Giovanni Bajo
[1] See also my page on PyInstaller: http://www.develer.com/oss/PyInstaller
--
http://mail.python.org/mailman/listinfo/python-list
ich are really core, like sys and os". This would also provide
guidance to future modules, as they would simply go in external modules (I
don't think really core stuff is being added right now).
At this point, my main goal is getting CJK out of the DLL, so everything that
lets me achieve this goal is good for me.
Thanks,
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
e made clear. I know portability among several UNIX flavours is one,
for instance. What are the others?
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
d a dynamic library, you have to
add a single line. This would take care of both Windows and UNIX, both
compilation, packaging and installation.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
plans.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
). How can I debug it?
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
announcement happened
after my mail was already posted. I'll update PyInstaller's website ASAP to fix
the now incorrect information in there.
Thanks,
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
import
> _gdi.pyd. Next would be to debug through _memimported.pyd, but I
> don't have a debug build of wxPython.
OK. Do you believe that _memimported.pyd can eventually converge to something
stable? Emulating LoadLibrary for all versions of Windows is not an easy task
after all. Wine
; from elementtree import ElementTree
>>> node = ElementTree.fromstring("""1""")
>>> node.text
'1'
>>> node.attrib["role"]
'success'
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
;t fit some scenarios.
So, why did it not make it to the standard library yet, given that it's so much
better than the alternatives?
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
PyInstaller a normal distutil package.
Happy packaging!
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
gt;
> That's one short "indefinitely":
>
> Not Found
> The requested URL /pyinstaller was not found on this server.
> Apache/2.0.53 (Fedora) Server at pyinstaller.hpcf.upr.edu Port 80
Yes, we had a short offline period today due to maintenance on the server,
sorry for tha
once downloaded?
Some people like the idea of "absolutely no installation process needed".
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
by PyInstaller will dump some stuff into your temp directory, but it
won't run into compatibility problem when run on that computer or with that
DLL. Anyway, I'm not against adding things to PyInstaller in principle: if
there is enough request for such a feature, we might as w
Giovanni Bajo wrote:
> PyInstaller 1.0 is out:
> http://pyinstaller.hpcf.upr.edu/pyinstaller
For the logs, the correct URL is:
http://pyinstaller.hpcf.upr.edu
The other was a redirector which is no longer valid after a site maintenance
session. I apologize for the inconvenience.
--
Gi
value3". I also
> made a c++ binding to PyINI with elmer toolkit.
The most useful feature would be to be able to write INI files back without
affecting their formatting, without removing user commands, etc. This is what
Windows APIs do, and it is what I am missing from most INI parsing libr
ither with pywin32, or with
> ctypes for those functions that aren't wrapped in pywin32.
Sure, but we were speaking of doing that in a portable library.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
A.__init__
[]
>>> class C(list, A):
... def __init__(self):
... print "C.__init__"
... super(C, self).__init__()
...
>>> C.__mro__
(, , , )
>>> C()
C.__init__
[]
It seems weird to me that I have to swap the order of bases to get the expected
be
("sin(pi/2)")
1.0
>>> calc("sys.exit()")
Traceback (most recent call last):
File "", line 1, in ?
File "", line 2, in calc
File "", line 2, in safe_eval
File "", line 0, in ?
NameError: name 'sys' is not defined
>>> calc("0x1000 | 0x0100")
4352
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
ally access any of the func_globals attributes:
When __builtin__ is not the standard __builtin__, Python is in restricted
execution mode. In fact, I believe my solution to be totally safe, and I
otherwise would love to be proved wrong.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
7;, the current
globals are copied into globals before expression is parsed. This means that
expression normally has full access to the standard __builtin__ module and
restricted environments are propagated
"""
In fact, the documentation for eval() could be improved to explain the
to show
is that my simple one-liner is no worse than a multi-page full-blown expression
parser and interpreter.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
sad to send patches to
Python and have them ignored for years (not even an acknowledge). Really sad.
This is why I'm not going to do that again.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
total flexibility and
orthogonality of provided features, incredible portability. I would suggest
wxPython only if you cannot meet PyQt license requirements (and this is going
to change soon, since Qt4 will have a GPL version for Windows too).
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
ave everything you need to build
your extensions. I saw patches floating around to build Python itself with the
free version (a couple of small nits).
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
;m
just showing that there are simple and reasonable examples of cases where you
would like to indent your code in different ways and you can't.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
elf.mutex.lock, self.mutex.unlock):
pass
Either that, or "with" could call adapt() implicitly so I can register my
conversion functions.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
Shane Hathaway wrote:
> Here's the real problem: maintaining import statements when moving
> sizable blocks of code between modules is hairy and error prone.
You can also evaluate a solution like this:
http://codespeak.net/py/current/doc/misc.html#the-py-std-hook
--
Giovanni Bajo
Sergey wrote:
> Which module to use to do such thing:
> "-a -b -c '1 2 3'" -> ["-a", "-b", "-c", "'1 2 3'"]
>>> import shlex
>>> shlex.split("-a -b -c '1 2 3'")
['-a', '-b', '-c', '1 2 3']
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
clude paths and
whatnot, but nothing is exposed at a higher level.
I was going to subclass build_ext and find a way to piggy-back
link_executable() into it instead of link_shared_object(), but I thought I
asked before doing useless / duplicate work.
--
Giovanni Bajo
--
http://mail.python.org/m
x27;: 1135900994,
... '.\\New Text Document.txt': 1135900552}
>>> file("foo", "w").write(repr(d))
>>> data = file("foo").read()
>>> data
"{'.sync_pics.py': 1135900993, '.file_history.txt': 1135900
Python with popen[1234]/subprocess). You also get nice signals
from the process which interact well in a Qt environment.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
mparable. I'd say breaking that
> is a bad thing. But if you don't break that, then having "x == y"
> raise an exception for user classes seems wrong. The comparison should
> be False unless they are the same object - which is exactly what
> equality based on id gives us.
[EMAIL PROTECTED] wrote:
> I'm trying to import a module at runtime using variables to specify
> which module, and which functions to execute. for example:
>
> mStr = "sys"
> fStr = "exit"
>
> # load mod
> mod = __import__(mStr)
> # call funct
Mudcat wrote:
> Is there any way to do this or am must I load all modules by function
> name only if it's after initialization?
Not sure. globals().update(mod.__dict__) might do the trick. Or just design a
better system and be done with it.
--
Giovanni Bajo
--
http://mail.python.
\x01\x02'
>>> len(bytes)
3
>>> ord(bytes[0])
0
>>> rb = repr(bytes)
>>> rb
"'\\x00\\x01\\x02'"
>>> len(rb)
14
>>> rb[0]
"'"
>>> rb[1]
'\\'
>>> rb[2]
'x'
>>> rb[3]
'0'
>>> rb[4]
'0'
>>> bytes2 = eval(rb)
>>> bytes == bytes2
True
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
ost a quarter of the space, compared to
> your method (stored as TEXT).
Sure, but he didn't ask for the best strategy to store the data into the
database, he specified very clearly that he *can't* use BLOB, and asked how to
tuse TEXT.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
to provide more flexibility in adaptation:
>>> partial(capture, "a", _1, _2)("b", "c")
("a", "b", "c")
>>> partial(capture, "a", _2, _1)("b", "c")
("a", "c", "b")
I don't see mention of this in the PEP, but it's a nice feature to have IMO.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
tion, compared to the numbered
placeholders solution.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
Waguy wrote:
> import zipfile
> file = zipfile.ZipFile("c:\\chessy.zip", "r")
Use "rb".
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
e DLL should contain the minimum set of
modules needed to run the following Python program:
---
print "hello world"
---
There's probably some specific exception I'm not aware of, but you get the
big picture.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
Waguy wrote:
> I tried that to and it didn't work, got the same message
> Thanks though,
Can you send / provide a link to a minimal zip file which reproduces the
problem?
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
gt; Data
> Data
> Data
>
> Data
> Data
> Data
> Data
>
Given your description, pyparsing doesn't feel like the correct tool:
secs = {}
for L in file("foo.txt", "rU"):
L = L.rstrip("\n")
if re.match(r"<.*>", L):
name = L[1:-1]
secs[name] = []
else:
secs[name].append(L)
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
rform some optimizations. It'd be worthwhile
> seeing if the DLL would speed up or shrink if whole program
> optimization was turned on.
There is no way whole program optimization can produce any advantage as the
modules are totally separated and they don't have direct calls that
t;>> a["foo"]["bar"] = 2
>>> a["foo"]["dup"] = 3
>>> print a["foo"]["bar"]
2
>>> print a
{'foo': {'dup': 3, 'bar': 2}}
So I advise using this class, and suggest the OP to try using setdefault()
explicitally to better understand Python's philosophy.
BTW: remember that setdefault() is written "setdefault()" but it's read
"getorset()".
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
int of view.
Instead of trying to write a Python data structure which behaves like
Perl's, convert a Perl code snippet into Python, using the *Pythonic* way of
doing it, and then compare things. Don't try to write Perl in Python, just
write Python and then compare the differences.
--
Gio
- use *args instead for the
> list-constructor.
>
> list(a,b,c)
No, you can't. That's ambigous if you pass only one argument, and that
argument is iterable. This is also the reason why set() doesn't work this
way.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
rch turned up that its addition
was mentioned in Python 2.3 release notes.
This should be fixed in the documentation.
Thanks!
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
anything. Can you please email
> the
> address shown in the documentation ([EMAIL PROTECTED]), or by using the
> Python bug tracker?
Sure, I'll use e-mail. My previous attempt at using the Python bug tracker was
a failure (totally ignored after years) so I'm keen on trying some other way.
Thanks!
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
last):
File "", line 1, in ?
AttributeError: 'named_tuple_class' object has no attribute 'z'
>>> t = NamedTuple(("p", "pos", "position", 12.4))
>>> t
(12.4,)
>>> t.p
12.4
>>> t.pos
12.4
>>> t.position
12.4
>>> t = NamedTuple(("p", "pos", 12.4), length="foo")
>>> t
(12.4, 'foo')
>>> t.p
12.4
>>> t.pos
12.4
>>> t.length
'foo'
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
Christoph Zwerschke wrote:
> Sometimes I was missing such a feature.
> What I expect as the result is the "cartesian product" of the strings.
I've been thinking of it as well. I'd like it for lists too:
>> range(3)**2
[(0,0), (0,1), (0,2), (1,0), (1,1), (1,2), (2
s) for the following
packages:
- NumPy 0.98
- Numeric 24.2
- PyOpenGL 2.0.2.01 (with Numeric 24.2)
- Pyrex 0.9.4.1 (with a Python 2.5 compatibility patch posted in its mailing
list)
I plan to update this page later as I build more installers (but don't hold
your breath). Hope this helps everybody!
--
would not
be enough.
If the PSF committee lowers its requests to a more realistical amount of
effort, I'm sure we will see many more people willing to help. I think many
people (including myself) would be willing to half-half-help with loose
ends, but when faced with an abnormous "6-10
s (and I have not raised this point
before because, believe me if you can, I really thought it was obvious and
implicit).
So, if your remarks apply to me, I think you are misrepresenting my mails
and my goals.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
quot;being written in Python" has a requirement for
the tracker.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
nonfree after people were
> already using it.
Moreover, this looked like a very good chance to have this nuisance sorted out.
Too bad some people don't value free software enough.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
d with
closed-source tools is not a problem since people can still compile it with
different free compilers.
> IMHO, using Jira presents risks that are manageable:
> [...]
>
> * A data export is available if we decide to switch. [...]
Out of curiosity, how is this obtaine
t number of volunteer admins
(roughly 6 - 10 people) who can help set up and maintain the Roundup
installation.
"""
This is *NOT* a perfectly reasonable offer, because you do not see 6-10 people
stepping up at the same time for almost *anything* in the open source world.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
tion, and no more
than 1 person to maintain it afterwards. *IF* there are more volunteers, that's
good, they can offload the maintenance work from a single maintainer; but I
think it's unfair to put such a high *requisite*.
We do not have 6-10 people maintaining SVN afterall, even if you wish we had :)
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
weird things are being done behind the curtain. I think the
point of uncertainty araises only if you totally trust someone else to do the
job for you.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
ptable for Python development? It looks
like an overexaggeration. People easily cope with 2-3 days of SVN freezing,
when they are politically (rather than technically) stopped from committing to
SVN. I guess they can wait 48 hrs to be able to close that bug, or open that
other one, or run that query.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
e 3-days delay in administrative issues because our single
administrator is sleeping or whatever, and then have 2-3 people doing regular
bug processing.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
ss. Has anybody an explanation for the difference? It's pure
> math so I expected Perl and Python to have about the same speed.
Did you try using an old-style class instead of a new-style class?
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
ot "you are not entitled
to have opinions because you do not act"? Your sarcasm is getting annoying. And
since I'm not trolling nor flaming, I think I deserve a little bit more of
respect.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
using new-style
classes.
Anyway, this is a bug on its own I believe. I don't think new-style classes are
meant to be 25% slower than old-style classes. Can any guru clarify this?
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
respect.
>
> IMO, regardless of whether you are trolling or flaming, you are
> certainly being disrespectful. Why should we treat you with any more
> respect than you give others?
Disrespectful? Because I say that I don't agree with some specific requirement,
trying to discuss a
s the bar for new developers: it's much harder to just "pick one" and fix
it. I know because I tried sometimes, and after half an hour I couldn't find
any bug that was interesting to me and "complete" enough to work on it. I also
noticed that most bugs are totally uncommented like nobody cared at all. This
is where my thought about Python missing bug triaging started.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
t;>> import csv
>>> def get_default_if():
... f = open('/proc/net/route')
... for i in csv.DictReader(f, delimiter="\t"):
... if long(i['Destination'], 16) == 0:
... return i['Iface']
... return None
...
>>>
>>> get_default_if()
'ppp0'
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
hieve the same speed.
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
00 loops, best of 3: 3.6 msec per loop
>>
>> I thought the two constructs could achieve the same speed.
>
> hint: how many times to the interpreter have to look up the names
> "int"
> and "L" in the two examples ?
Ah right, thanks!
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 173 matches
Mail list logo