Joan Miller pelok...@gmail.com wrote:
Does anybody knows any library to help me to avoid the use of the main
quotes, and brackets?
I would to use anything as:
$ ls /home = run(ls /home)
It's not a library, but IPython[1] provides a lot of what you're
after:
IPython 0.9.1 -- An enhanced
Terry Reedy tjre...@udel.edu wrote:
This statement was to counter the 'myth' that US was only targeted at
2.x when the current situation is quite the opposite.
Not so much 'myth' as 'outdated information', they were very clear
that 2.x was the initial target.
In particular, several people
Roy Smith r...@panix.com wrote:
I'm inclined to call it a docs bug that these keywords are not in the HTML
index. Yes?
No. The indices don't list the named parameters for any other built-
in, so why would they for print()?
--
http://mail.python.org/mailman/listinfo/python-list
geremy condra debat...@gmail.com wrote:
Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
Out of curiosity, and completely off-topic, why has Perl 6 gone so badly?
Too much like Perl.
I was going to suggest that it's probably due to the multitude of ways
to it could be done :)
--
On Jan 29, 4:29 pm, Stephen.Wu 54wut...@gmail.com wrote:
str.find(targetStr)
str.index(targetStr) with exception
str.count(targetStr)
targetStr in str
which is the fastest way to check whether targetStr is in str?
It's generally a lot quicker to investigate this kind of question
yourself
Tim Roberts t...@probo.com wrote:
it's not the most efficient way to automate applications
Sikuli doesn't seem that much different from Python in this way: it
may not be the most efficient use of the computer's time, but I dare
say it's significantly less demanding on the end user's.
I can see
Terry Reedy tjre...@udel.edu wrote:
Actually, Unladen Swallow is now targeted at 3.1; its developers have
conservatively proposed its integration in CPython 3.3. I would not be
completely shocked if it happens in 3.2.
Why do I feel like there's less of an onus on Unladen Swallow to
_actually
Rotwang sg...@hotmail.co.uk wrote:
Can anybody tell me what's going on?
Your problem is basically this:
a = [1]
b = [a] * 2
b
[[1], [1]]
a.append(2)
b
[[1, 2], [1, 2]]
The expression '[a] * 2' doesn't make two copies of list of a list of
a, it makes two nested _references_ to it. When you
Alf P. Steinbach al...@start.no wrote:
Actually not, IMHO. All it does is is to provide incompatibility. They forgot
Ronald Reagan's old maxim: if it don't need fixin', don't fix it.
[...]
Probably there must have been some rationale, but to put it bluntly removing
the
comparator is more
Victor Subervi wrote:
I think I finally have an interesting problem for y'all. I need to import a
script from a lower dir, forcing me to change dirs:
I'm surprised that no one has yet mentioned packages.
Suppose you have the following folder layout and you stick an empty
__init__.py in each
On Jan 19, 2:04 pm, tom badoug...@gmail.com wrote:
trying to figure out how to solve what should be an easy python/regex/
wildcard/replace issue.
but i'm missing something...
Well, some would say you've missed the most obvious solution of _not_
using regexps :)
I'd probably do it via string
Blog blogtes...@gmail.com wrote:
Have you not heard about the Unladen Swallow project from google?
There's a new PEP coming up which will propose google's codebase to be
merged with Py3k, resulting in superior performance.
This kind of worries me for a number of reasons:
* unladen is _way_
On Jan 18, 12:30 pm, Jive Dadson notonthe...@noisp.com wrote:
These instructions are for MS Windows.
1) Create your modules folder. Let's say it's named Modules. The
documentation calls it a package.
2) In an explorer window or on the desktop, right click on My Computer,
and select
On Jan 18, 8:22 am, W. eWatson wolftra...@invalid.com wrote:
I've found it a bit aggravating that using dir and
help, for example, that the output just rolls on off the screen and I
have to play around with the shell scroll bars to find what I'm looking
for. A few simple changes to mydir
Jive Dadson notonthe...@noisp.com wrote:
That requires a directory whose name embeds the Python version number,
which is the evil from which I flee, or rather sought to flee. Imagine
if all your C++ code had to go into directories that were named for some
specific C++ compiler. It's just
On Jan 12, 1:26 pm, Alan Harris-Reid aharrisr...@googlemail.com
wrote:
Does anyone know where I can find any decent dynamically-constructed
HTML control classes (dropdown list, table, input field, checkbox, etc.)
written in Python.
There's pyWeb[1], which seems pretty close to what you're
On Jan 6, 9:03 pm, wiso gtu2...@alice.it wrote:
I'm optimizing the inner most loop of my script. I need to convert month
name to month number. I'm using python 2.6 on linux x64.
month_dict = {Jan:1,Feb:2,Mar:3,Apr:4, May:5, Jun:6,
Jul:7,Aug:8,Sep:9,Oct:10,Nov:11,Dec:12}
def
Phlip phlip2...@gmail.com wrote:
And I, not my language, should pick and chose how to be rigorous. The language
should not make the decision for me.
Since you seem unwilling to put the minimal effort into producing the
support code you'd need to work with Python the way you want, perhaps
Perl
Valentin de Pablo Fouce thi...@gmail.com wrote:
My intention is to be able to transfer files from one computer to
another in this environment.
Looking (and surfing) at internet the only suggestion given is to use
low level sockets for this file transfer. Is there another way to do
it, is
r0g aioe@technicalbloke.com wrote:
Well I think sometimes, for the sake of expediency and overall
pleasantness, it's better to let the smaller things go: and if you just
can't let them go then at least try and issue corrections in a friendly
manner rather than a cold or pious one.
The
Phlip phlip2...@gmail.com wrote:
They will tell me how to use except: (which is a good example why a
program should not use exceptions for its normal control flow if at
all possible).
Really? Magic functions that coerce and eat errors are a better coding
technique than exceptions and explicit
Steven D'Aprano ste...@remove.this.cybersource.com.au wrote:
Stick around and you might learn something,
but if you bite every time somebody tries to teach you, you'll soon run
out of people willing to help you.
The ongoing crowdsourced development by this group of Victor
Subervi's project
Carsten Haese carsten.ha...@gmail.com wrote:
What is the underlying problem you're trying to solve with this
approach?
To be paid for developing a web site shopping cart without actually
having to learn Python.
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 4, 5:42 pm, elca high...@gmail.com wrote:
how can i add proxy support into my mechanize script?
i was look for some reference , but not so much good hint from google.
There are examples on using proxies with mechanize on the module's
home page:
http://wwwsearch.sourceforge.net/mechanize/
On Jan 4, 9:25 pm, elca high...@gmail.com wrote:
that is only support mechanize.browser module.. actually
im looking mechanize.urlopen method.
From the docs:
In these examples, the workings are hidden inside the mechanize.urlopen
() function, which is an extension of urllib2.urlopen().
On Jan 5, 9:33 am, Nav navjotmu...@gmail.com wrote:
what are the risks of globalnamespace use
You're unnecessarily tying your code to the implementation.
and what are the benefits?
Absolutely none that using a dictionary doesn't also give you.
--
On Jan 5, 3:40 am, Joe Riopel goo...@gmail.com wrote:
On Mon, Jan 4, 2010 at 12:28 PM, Victor Subervi victorsube...@gmail.com
wrote:
Hi;
I have this code snippet:
sql '''create table if not exists %sCustomerData (
I think you may have forgotten the = after sql.
Jesus wept. How
On Jan 5, 1:12 pm, Nav navjotmu...@gmail.com wrote:
When we create instances of objects by doing
x = className ()
are we using globalnamespace?
Well, you're using a namespace, which namespaces its in would depend
on the scope in which that assignment occurred. And there's not really
a global
On Jan 2, 11:37 am, W. eWatson wolftra...@invalid.com wrote:
I suspect that if one installs v2.4 and 2.5, or any two versions, that
one will dominate, or there will be a conflict. I suppose it would not
be possible to choose which one should be used. Comments?
I suspect that you're not the
Donn donn.in...@gmail.com wrote:
I find the notion of minute hot areas to be a little obscure -- Quick! Zoom
into the last full-stop, it's a whole word in there!
This aspect reminds me of the Red Dwarf episode Back to Reality, in
which Rimmer is criticised for not finding information contained
Phillip M. Feldman pfeld...@verizon.net wrote:
It does seem as though IPython could be a bit more clever about this.
I disagree. I _like_ that IPython is only reporting on the current
state of the interpreter and not trying to second guess what I meant.
If the user asks for documentation on
zeph zep...@gmail.com wrote:
True, though by *context* the after method looks like it takes a time
(probably in milliseconds, given its size), and a method, and calls
the method after that amount of time, and returning some process/
thread id to self.after_id. Though if that's right, we still
Patrick Stinson patrickstinson.li...@gmail.com wrote:
Not true. We sell the industry leading sampler engine, and it has been
paying my salary for three years. It's high performance - every cycle
counts. Our sampled instruments is loaded as a plugin from third-party
applications and has been
On Nov 27, 1:24 pm, astral orange 457r0...@gmail.com wrote:
I would like to test out what I know so far by solving programming
challenges.
Project Euler can be a lot of fun: http://projecteuler.net/
--
http://mail.python.org/mailman/listinfo/python-list
NiklasRTZ nikla...@gmail.com wrote:
no py IDE I found has easy hg access.
ActiveState's Komodo IDE has support for CVS, Perforce, subversion,
bazaar, git and mercurial.
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 24, 1:15 pm, Peng Yu pengyu...@gmail.com wrote:
Suppose that I have function f() that calls g(), I can put a test on
the argument 'x' in either g() or f(). I'm wondering what is the
common practice.
If I put the test in f(), then g() becomes more efficient when other
code call g() and
On Nov 24, 3:15 pm, Sean McIlroy sean_mcil...@yahoo.com wrote:
[code snipped]
Great stuff. Have you considered bundling it up and putting it onto
PyPI?
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 19, 3:21 pm, Stephen.Wu 54wut...@gmail.com wrote:
FIX message is the Financial information Exchange protocol
messages...
any 3rd libs we have?
You mean like this one that was the first result when I googled
'python financial information exchange'?
http://www.quickfixengine.org/
--
Daniel Fetchinson fetchin...@googlemail.com wrote:
How did you make the html 'screenshots'? I guess you have some kind of
urwid2html tool or some such or is it plain ncurses?
It's all handled in the demo code. This is from tour.py:
if urwid.web_display.is_web_request():
screen =
Peng Yu pengyu...@gmail.com wrote:
But the document doesn't say shutil need to be imported in order to
use WindowsError. Shall the document or the code be corrected?
Neither, it's your understanding that needs correction.
Benjamin wasn't trying to say that WindowsError is defined within
Peng Yu pengyu...@gmail.com wrote:
I don't know about others. The wording Windows-specific error occurs
was ambiguous to me. It could refers to some errors resulted from
copying (on a linux machine) some files from linux file systems to
windows files systems (via samba, maybe). I recommend to
Steve Ferg steve.ferg.bitbuc...@gmail.com wrote:
Does anybody know a language with this kind of syntax for
ifThenElseEndif?
VBScript.
Is there any particular reason why this might be a *bad* language-
design idea?
VBScript.
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 13, 10:47 am, Kevin Cole dc.l...@gmail.com wrote:
Hi,
I recently asked our IT department how to gain access to an
addressbook. After carefully explaining that I was on a Linux system
using Python, I got the reply:
You should use our LDAP. With LDAP you can pull any data you want
On Nov 12, 2:46 pm, Peng Yu pengyu...@gmail.com wrote:
I see Error is derived from EnvironmentError in shutil.py.
class Error(EnvironmentError):
pass
I'm wondering why EnvironmentError can not be raised directly. Why
Error is raised instead?
This way you can explicitly trap on
Daniel Fetchinson fetchin...@googlemail.com wrote:
Yes, this is about the right kind of response I think everybody
deserves who puts energy/enthusiasm/effort/time into putting together
a python-related forum.
So what's the right kind of response deserved by those who put energy/
Peng Yu pengyu...@gmail.com wrote:
I don't think that this is a problem that can not be overcome. A
simple solution might be to associate a unique identifier to each
file, so that even the filename has been changed, the new version and
the old version can still be identified as actually the
On Nov 2, 8:11 am, Peng Yu pengyu...@gmail.com wrote:
I prefer organized my code one class/function per file (i.e per module
in python). I know the majority of programmers don't use this
approach. Therefore, I'm wondering what its disadvantage is.
You mean, what disadvantages it has _other_
Saketh saketh.bhamidip...@gmail.com wrote:
If you have any suggestions, let me know -- this is a community
effort!
I'd like to suggest Pyaspora as a more apropos name ;)
--
http://mail.python.org/mailman/listinfo/python-list
Peng Yu pengyu...@gmail.com wrote:
So I am asking disadvantages besides python import mechanism is not
friendly to it.
Which part of name collisions have to be resolved somehow isn't
explicit enough for you?
You can't keep saying this works in C++ while refusing to accept
that this is an
On Oct 31, 12:48 pm, elca high...@gmail.com wrote:
Hello,
i have some text document to parse.
sample text is such like follow
in this document, i would like to extract such like
SUBJECT = 'NETHERLANDS MUSIC EPA'
CONTENT = 'Michael Buble performs in Amsterdam Canadian singer Michael Buble
Alf P. Steinbach al...@start.no wrote:
And no, I didn't do any research on that. If it mattered more (e.g. appearing
as
statement in the text) I'd have done that. The nice thing about Usenet is that
people rush in to correct things. ;-) url:http://xkcd.com/386/
Unfortunately, the idiocy
Terry Reedy tjre...@udel.edu wrote:
alex23 wrote:
You're completely wrong. Immutability has nothing to do with identity,
which is what 'is' is testing for:
What immutability has to do with identity is that 'two' immutable
objects with the same value *may* actually be the same object
CSharpner csharp...@gmail.com wrote:
Here's what I /want/ to do, but don't know where to begin:
Welcome to the fun :)
- Write web services in Python (I've done plenty of this in .NET,
BTW).
I'm a big fan of CherryPy: http://www.cherrypy.org/
It's very straightforward and easy to get into.
On Oct 29, 4:31 pm, codingJoe tracy.monte...@gmail.com wrote:
I am trying to choose the right data structure to do a value lookup
with multiple keys.
Hey Joe,
Is something like this what you're after?
from collections import defaultdict
sports = defaultdict(list)
kj no.em...@please.post wrote:
As my Python apps grow in complexity and execution, I'm finding it
more often the situation in which a program dies after a lengthy
(i.e. expensive) run because the execution reaches, say, a typo.
This is a good reason for breaking your program down into testable
Alf P. Steinbach al...@start.no wrote:
However, given what I've now learned about the current situation wrt. versions
of Python, where Python 3.x is effectively a new language, and where
apparently
ActiveState has no installer for that, I'm rewriting to use the official
distribution.
I hope
On Oct 30, 1:10 pm, Nick Stinemates n...@stinemates.org wrote:
Some objects are singletons, ie there's only ever one of them. The most
common singleton is None. In virtually every other case you should be
using == and !=.
Please correct me if I am wrong, but I believe you meant to say some
On Oct 28, 1:56 am, Aweks a...@ewadev.com wrote:
what do you use?
ActiveState's Komodo IDE.
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 28, 8:26 am, yoshco yes@gmail.com wrote:
hello everyone
i have 3 arrays
xVec=[a1,a2,a3,a4,a5]
yVec=[b1.b2.b3.b4.b5]
zVec=[c1,c2,c3,c4,c5]
and i want to output them to a ascii file like so
a1,b1,c1
a2,b2,c2
a3,b3,c3
...
I'd probably go with something like the following:
Gerard Flanagan grflana...@gmail.com wrote:
I realise that calling this count function with a single argument would
be functionally identical to calling str.count(), yes. But I can imagine
the situation of wanting to find multiple (disjoint) substrings. Is
there a reason for preferring
Aaron Watters aaron.watt...@gmail.com wrote:
I just tried it. How do you get a traceback? For me none of the
javascript links work: they just do nothing.
I'm getting the same as Paul in Firefox 3.5.3 with javascript
disabled:
class 'whiff.resolver.ModuleRootResolutionException' Python 2.5:
Gerard Flanagan grflana...@gmail.com wrote:
def count(text, *args):
Other than the ability to handle multiple substrings, you do realise
you've effectively duplicated str.count()?
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 19, 3:53 pm, Jabba Laci jabba.l...@gmail.com wrote:
Would someone explain how str[::-1] work? I'm new to Python and I only
saw so far the str[begin:end] notation. What is the second colon?
Slice notation is of the form [start:stop:step]. start defaults to the
start of the sequence, stop
On Oct 19, 12:32 pm, ru...@yahoo.com wrote:
On Oct 18, 4:20 pm, MRAB pyt...@mrabarnett.plus.com wrote:
Benjamin Middaugh wrote:
Thanks to everyone who helped with my query on reversing integers. I
have one more simple problem I'm having trouble solving. I want to check
a number for
ru...@yahoo.com wrote:
One, it was suggested without any evidence the the OP was
probably asking about homework. My observation over
several years is that this group has a very poor record
of identifying homework problems. And if someone can
conclude that the OPs problem was homework with
On Oct 15, 6:58 pm, an...@vandervlies.xs4all.nl wrote:
Does HTMLgen (Robin Friedrich's) still exsist?? And, if so, where can it
be found?
If you're after an easy to use html generator, I highly recommend
Richard Jones' html[1] lib. It's new, supported and makes very nice
use of context
On Oct 9, 10:26 am, Henrik Lied henrikl...@gmail.com wrote:
An experiment I'm currently involved with requires some form of texual
analysis to figure out the mood of sentences (ergo, if the sentence
in any way seem negative or positive).
I vaguely recall seeing a presentation on exactly this
Jean-Michel Pichavant jeanmic...@sequans.com wrote:
a possible answer:
- explicit implicit
I'm not sure this is the correct one though :)
To me, the explicit reference to the base class violates DRY. It also
means you need to manually change all such references should the base
class ever
Jean-Michel Pichavant jeanmic...@sequans.com wrote:
alex23 wrote:
To me, the explicit reference to the base class violates DRY. It also
means you need to manually change all such references should the base
class ever change, something that using super() avoids.
I found the correct answer
Steven D'Aprano ste...@remove.this.cybersource.com.au wrote:
Oh please. That's a ridiculous excuse. Your post started with Here you
are -- the implication is that you thought it *was* a solution, not a
hint. A hint would be something like Write a key function, perhaps using
lambda, and pass it
On Oct 5, 8:05 am, Manowar r_marcanto...@netzero.net wrote:
I am new to pyton and have asked this question several times the
answer is always not sure.
Here is my question sekeltal animation ( bone animation) is it
possible with python? What i want to develop is an aquarium in
realtime,
On Oct 3, 11:54 pm, n00m n...@narod.ru wrote:
I need your help to understand howhttp://www.spoj.pl/problems/INOUTEST/
can be passed in Python.
My code for this is:
===
import psyco
psyco.full()
import sys
def noo(b):
b = b.split()
return
On Oct 4, 1:58 pm, n00m n...@narod.ru wrote:
Do you know how big the input data set actually is?
Of course, I don't know exact size of input.
It's several MBs, I guess. And mind the fact:
their testing machines are PIII (750MHz).
Well, then, that's moved the problem from challenging to
Timothy W. Grove tim_gr...@sil.org wrote:
I was just wondering if there was a way using python to view and recover
files from the hard drive which would otherwise remain lost forever?
I'm not familiar with any Python-based tools for data recovery, but
you might be interested in mercurial[1],
Tim Chase python.l...@tim.thechases.com wrote:
If you're doing more processing than just printing it, your
for-loop is a better (clearer) way to go. If you have lots of
processing code, it might help to do the inverse:
for filename in os.listdir(location):
if not
dksr dksre...@gmail.com wrote:
Yes thats what I thought. for-else looks similar to if-else and in if-
else, else part is executed only when if part is not executed, but in
for-else it has entirely a different job.
If you think of if-else more in terms of the else-branch occurring
when the
Mars creature jin...@gmail.com wrote:
Assume that I have 10 parameters need to pass to the function. If
these parameters are fixed, I can use another module to store these 10
parameters, and import to the module, as suggested by jean-michel. But
what if these 10 parameters will be changed in
On Sep 30, 1:30 am, Mikie thephantom6...@hotmail.com wrote:
Could soneone show me a simple example of a twisted server that loads
2 html pages
www..com:7899/page1/
www..com:7899/page2/
Thanx
Hey Mikie,
Jp Calderone has been writing a very handy 'Twisted Web in 60 seconds'
series,
Peng Yu pengyu...@gmail.com wrote:
I want some command to jump out of nested loop. I'm wondering what is
the most convenient way to do so in python.
I'm sure I'm wasting my breath by saying this, but would it hurt you
to actually check the list before posting? You're not the only person
to ever
Sean DiZazzo half.ital...@gmail.com wrote:
I remember reading (a few times) a presentation about using generators
to create pipelines The idea was to create very specific and small
generator functions, and then combine them together to get larger
results. The example used was to parse log
Alfons Nonell-Canals alfons.non...@upf.edu wrote:
finally I've solved it using a combinatorics library which allows to
do this kind of things.
If you're using a version of Python 2.6 you might find that
itertools.combinations does what you want without requiring the
additional code.
--
On Sep 23, 12:44 pm, alex23 wuwe...@gmail.com wrote:
Alfons Nonell-Canals alfons.non...@upf.edu wrote:
finally I've solved it using a combinatorics library which allows to
do this kind of things.
If you're using a version of Python 2.6 you might find that
itertools.combinations does what
Peng Yu pengyu...@gmail.com wrote:
Is __repr__ = __str__ copy by reference or by value? If I change
__str__ later on, will __repr__ be changed automatically?
What would you expect the outcome to be if these were functions rather
than class methods? (Or any type of object, really...)
Wouldn't
Peng Yu pengyu...@gmail.com wrote:
What does @echo mean?
Have you read _any_ of the documentation? Or is this all an exercise
in seeing if you can convince a group of disparate strangers to teach
you Python for free?
--
http://mail.python.org/mailman/listinfo/python-list
Peng Yu pengyu...@gmail.com wrote:
I'm wondering if the development of python is test driven. If it is,
where in the Python-2.6.2 source directory is the test code for the
modules in ./Lib?
Unsurprisingly, they're located in Lib/test. Is it _really_ that
difficult to find?
--
Hendrik van Rooyen hend...@microcorp.co.za wrote:
The opposite thing is of course a continual source of trouble - we all have
words for stuff we have never seen,
like dragon, ghost, goblin, leprechaun, the current King of
France, God, Allah, The Holy Trinity, Lucifer, Satan, Griffin -
TerryP bigboss1...@gmail.com wrote:
Yeah, I'm sure that is the same kind of thinking that caused 16-bit MS-
DOS applications to remain a part of Windows NT so long.
So what part of the standard library do you recommend using instead?
Or was there no time for advice between snarkiness?
--
On Sep 18, 2:39 pm, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
Granted, a proper version would use a class where the two Venus
objects have a different description...
I think I'd be more inclined to model Venus and treat the others as
views :)
--
On Sep 18, 3:08 pm, rantingrick rantingr...@gmail.com wrote:
ok here is some code. this will cause an infinite recursion.
class A():
def __init__(self, *args):
self.nestedA = A(*args) #NO GOOD!
there must be a way to create an instance of an object within the same
objects
On Sep 18, 3:08 pm, rantingrick rantingr...@gmail.com wrote:
ok here is some code. this will cause an infinite recursion.
class A():
def __init__(self, *args):
self.nestedA = A(*args) #NO GOOD!
How about:
class A(object):
def __init__(self, first=True, *args):
if
On Sep 18, 3:31 pm, alex23 wuwe...@gmail.com wrote:
On Sep 18, 3:08 pm, rantingrick rantingr...@gmail.com wrote:
ok here is some code. this will cause an infinite recursion.
class A():
def __init__(self, *args):
self.nestedA = A(*args) #NO GOOD!
How about:
class
On Sep 10, 4:17 pm, Michel Claveau -
MVPenleverlesx_xx...@xmclavxeaux.com.invalid wrote:
What is this final comma?
My guess without looking at the code is that the line occurs in a dict
definition:
PACKET_OF_VALUES = dict(
maintainer=uSebastien Sable,
version=3.0,
...
)
Sean DiZazzo half.ital...@gmail.com wrote:
What are you using to test the scripts? I could be completely wrong,
but I find it hard to believe that the second version is much (if any)
faster than the first. Then again, I don't know much about the
internals...
Sorry, Sean, unfortunately you
Carl Banks pavlovevide...@gmail.com wrote:
Sorry, alex, unfortunately you are wrong, although it's understandable
that you've missed this.
[...]
The speedup comes because local lookups are much faster. Accessing a
local is a simple index operation, and a nonlocal is a pointer deref
or two,
Piet van Oostrum p...@cs.uu.nl wrote:
[myFunc(elt, 'booHoo') for elt in myList] is also a good candidate and
in this case I think it is preferable to both the loop and the map with
a partial or lambda in terms of clarity.
From memory, a listcomp with a non-builtin function is also faster
than
Pierre pierre.gaill...@gmail.com wrote:
I would like to know if it is possible to define a loop in a lambda
function
It is if you can easily replace the for loop with a call to map():
s_minus_1 = lambda s: map(lambda x: x-1, s)
test = range(1, 100, 10)
test
[1, 11, 21, 31, 41, 51, 61,
dolgion ch dolgi...@gmail.com wrote:
the NETRPCGateway attribute self.db can't be set? why not? i've tried
changing the RPCSession login function
to set the variable like this as well:
self.gateway.db = db
which doesn't work either, same exception.
any suggestions?
The problem is
Mark markonli...@internode.on.net wrote:
On Sun, 23 Aug 2009 21:45:17 +0100, Goke Aruna wrote:
http://www.openerp.com, all done is python.
That does look impressive. Is that Django or Turbogears?
Turbogears, according to the product's wikipedia page.
--
Phil phil...@gmail.com wrote:
My interest in Python 3.1 was actually to develop a framework. Again,
I can feel the flames. :) I understand there are enough frameworks but
I actually have no applications that I wish to develop.
No offense intended, but that's probably the worst approach to
devaru ajoys...@gmail.com wrote:
I am new to Python language. I want to capture(either in database or a
file) the conversation in IRC.
Please suggest me some simple IRC library or code snippet for this.
I recommend the circuits[1] library, which contains a sample irc bot
[2]. You'll want to
801 - 900 of 1391 matches
Mail list logo