nt=webmail>.
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Em sex., 2 de out. de 2020 às 18:03, Kyle Stanley
escreveu:
> Hi Luis,
>
> There is not a maintained list of every possible combination of exception
> type and message because they're continuously being added withi
cs.python.org/3/library/exceptions.html) I only
can check the type error.
[]s
Em qui., 1 de out. de 2020 às 15:59, Luis Gustavo Araujo <
luisaraujo.i...@gmail.com> escreveu:
> Hi,
> Is it possible to get the list of all error messages that display in
> Python? I want th
Hi
Why
ttk.Style().configure(".", font=('Courier New', 30, "bold"))
works for Button and Label widgets (and maybe others) and don't works for Entry
widget?
Example in Python 3:
from tkinter import *
from tkinter import ttk
from tkinter import font
root = Tk()
ttk.Style().configure(".", font=(
Hi
When I double click a .py file, a windows appears and immediately disappears.
How can I associate the .py file extension to the IDLEX EDITOR?
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
Hi all
I wrote this script that can read the Python Calendars and shows the
geolocated info on a map and on a timeline.
http://lmorillas.github.io/python_events/
Enjoy
Saludos,
-- luismiguel (@lmorillas)
2015-01-13 22:18 GMT+01:00 M.-A. Lemburg :
> [Please help spread the word by forwardin
th some app?
Thanks
--
------
Luis R. Romano
PS: here is my code:
http://pastebin.com/g6fqHsxS
--
https://mail.python.org/mailman/listinfo/python-list
Hi All,
Hope you're doing great. One quick question. I am defining an array of sets
using numpy as:
a=array([set([])]*3)
Now, if I want to add an element to the set in, lets say, a[0], and I use the
.add(4) operation, which results in:
array([set([4]), set([4]), set([4])], dtype=object)
whi
Hi, i tried what you suggest but still asking me for the password, this
time twice.
Please i need help so this is for my thesis.
VII Escuela Internacional de Verano en la UCI del 30 de junio al 11 de julio de
2014. Ver www.uci.cu
--
https://mail.python.org/mailman/listinfo/python-list
I've installed python for all users with full permissions to all users
(see picture).
Python runs for all users.
However, scripts only work when I run as Administrator.
Running a script always results in an "ImportError: cannot import name" error.
Here, for example, is the output of "pip -h" run as
Hi All. I am trying to create an executable file containing an optimization
code using the pyomo package for optimization modeling along with ither
packages like Numpy. When using py2exe to perform the task it generates the
executable file, but when I try to run it it reports: Import Error: No m
mailing list pythonvision at
https://groups.google.com/forum/#!forum/pythonvision
is a good forum. Plenty of people from different projects lurk there.
HTH,
Luis
--
http://mail.python.org/mailman/listinfo/python-list
hattan "loft"
Lots of fun with Apple products and ereaders
luis perez | principal
winter wyman companies - technology staffing
tel: 212.616.3582| fax: 212.616.3592 | aim: lpcnn23
I
Please consider the environment before printing this email
This is the easiest and most pythonic way (IMHO):
>>>> l3 = [i+e for i in li1 for e in li2]
>>>> l3
['a1', 'a2', 'b1', 'b2']
Regards,
Luis
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 16, 2:11 pm, Seebs wrote:
> On 2011-08-16, smith jack wrote:
>
> > what is the advantage of Django over RoR:)
>
> This question is pretty much... I mean, you're not gonna get useful
> answers. They're based on such different languages that I think any
> comparison past that is likely goin
python implementation in javascript.
regards,
Luis
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 31, 1:50 pm, Ramon F Herrera wrote:
> On Jan 31, 10:49 am, Ramon F Herrera wrote:
>
>
>
>
>
>
>
>
>
> > (newbie alert)
>
> > This is what I have so far:
>
> >http://patriot.net/~ramon/upload_facility.html
>
> > The code is shown below. It seems I need that actual script that
> > performs t
.htm
>
> and stop when they start to talk about VBscript :)
>
> JM
I strongly second this suggestion.
Alan Gauld's example of a banking application was just what I needed
to finally understand object oriented programming.
This is how my head made the "click".
Luis
--
http://mail.python.org/mailman/listinfo/python-list
ce, you may look to something more advanced,
such as "Dive into Python".
All these resources are available online for free.
If you want to but a book, I like "Beginning Python: From Novice to
Professional".
Hope this helps...
Luis
--
http://mail.python.org/mailman/listinfo/python-list
I wonder if Unladen Swallow is still being considered for merger with
Python 3.3.
Is it?
On Dec 21, 4:18 pm, Georg Brandl wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On behalf of the Python development team, I'm happy to announce the
> second beta preview release of Python 3.2.
ing with Lua, you wish you had all the
missing python features.
I see Lua as a some sort of minimal Python. It looks like a simplified
subset of python.
Being simpler, it's also easier to implement efficiently. Note that
Lua was created a simple language to be embedded into larger
applications written in c or c++. So it doesn't need a standard
library, since you would be using libraries built for the main
aplication, written in c or c++.
However it worth noting that, according to Mike Pall (the creator of
Luajit), there's no reason to believe Python could not be as fast a
Luajit. It has no show stoppers. It would simply require much more
work around its corner cases, being the main difficulties in python's
own environment, not in the core language.
This is all explained in the above mentioned thread on tracing jits...
Luis
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 8, 5:44 pm, John Nagle wrote:
> On 7/8/2010 12:19 PM, Luis M. González wrote:
>
> > On Jul 8, 1:42 pm, John Nagle wrote:
> >> How is Unladen Swallow coming along? Looking at the site, code is
> >> being checked in and issues are being reported, but t
're now about 6 months behind their project
> plan.
>
> ("http://code.google.com/p/unladen-swallow/wiki/ProjectPlan";)
>
> John Nagle
Don't be shy.
Ask this question in Unladen Swallow's google group. They don't bite!
Luis
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 4, 5:58 pm, John Nagle wrote:
> TheUnladenSwallowpeople should in theory be able to reach
> that level of performance. (Both groups are employed at Google.
> So their effectiveness will be compared.)
>
> John Nagle
No. Collin Winter said that they will
On Jul 2, 4:07 pm, John Nagle wrote:
> David Cournapeau wrote:
> > I think one point which needs to be emphasized more is what does
> > python 3 bring to people. The" what's new in python 3 page" gives
> > the impression that python 3 is about removing cruft. That's a very
> > poor argument to pu
On Jul 4, 4:51 pm, Luis M. González wrote:
> On Jul 4, 12:30 am, sturlamolden wrote:
>
>
>
>
>
> > I was just looking at Debian's benchmarks. It seems LuaJIT is now (on
> > median) beating Intel Fortran!
>
> > C (gcc) is running the benchmarks faste
at length.
Pay special attention to Mike Pall's comments (he is the creator of
Luajit) and his opinion about python and pypy.
You will read also about other projects, specially new javascript
engines such as Mozila's Tracemonkey (the authors participate in this
thread) and the pypy folks.
It is a very good read for anyone interested in the subject. Very
recommended!
Good luck!
Luis
--
http://mail.python.org/mailman/listinfo/python-list
nLisp.html
That doesn't mean python can compete with other purely functional
languages, but it's probably as functional as it can be for a more
conventional, multiparadigm language.
Luis
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 14, 11:06 am, "Gabriel Genellina"
wrote:
> En Wed, 14 Apr 2010 06:10:59 -0300, Luis Quesada
> escribió:
>
>
>
> > On Apr 14, 6:31 am, "Gabriel Genellina"
> > wrote:
> >> En Tue, 13 Apr 2010 18:02:07 -0300, Luis Quesada
> >
On Apr 14, 6:31 am, "Gabriel Genellina"
wrote:
> En Tue, 13 Apr 2010 18:02:07 -0300, Luis Quesada
> escribi :
>
> > I am getting an "expected string without null bytes" error when using
> > cxfreeze for creating a standalone application (in Linux
Lawrence D'Oliveiro wrote:
In message , Luis Quesada wrote:
I am getting an "expected string without null bytes" error when using
cxfreeze for creating a standalone application (in Linux-Ubuntu).
Why bother? Every decent Linux system will have Python available. Why not
just d
om eclipse. What is the easiest
way of creating a standalone application? Is there a way of creating the
executable file from eclipse/pydev?
Cheers,
Luis
cxfreeze's output
lques...@lquesada-laptop:~/workspace/MetroNode/src/models$ cxfreeze
uncovered.py --target-dir dist
copying /us
Luis Quesada wrote:
Dear all,
Given a gps coordinate, I would like to find out the country the
coordinate belongs to. I wonder whether there is a python library that
offers this capability...
(In case somebody here is looking for the same thing)
Somebody in sci.geo.satellite-nav suggested
ed quotas
on bandwith and data used (which are quite generous). You don't need
to set up anything. All you need is a google account to get started.
Luis
--
http://mail.python.org/mailman/listinfo/python-list
Dear all,
Given a gps coordinate, I would like to find out the country the
coordinate belongs to. I wonder whether there is a python library that
offers this capability...
Thanks in advance for any pointer.
Cheers,
Luis
PS: I am already aware of basemap but it seems we cannot answer this
type
On 6 abr, 03:40, Chris Rebert wrote:
> 2010/4/5 Luis M. González :
>
>
>
>
>
> > This post gave me an
> > idea:http://groups.google.com/group/comp.lang.python/msg/5d75080707104b76
>
> > What if I write a simple decorator to figure out the types of every
>
back to the interpreter.
He! I have no idea how to implement it...
Any guru out there?
Luis
--
http://mail.python.org/mailman/listinfo/python-list
y using this information, we record all the argument types used
the first time each function/method is executed, and then we generate
optimized code for them.
>From this point on, a guard should check if all arguments remain the
same and, if so, the optimized code is run.
Otherwise, just fall back to the interpreter.
He! I have no idea how to implement it...
Any guru out there?
Luis
--
http://mail.python.org/mailman/listinfo/python-list
;: , 'b': , 'd': }
So by using this information, we record all the argument types used
the first time each function/method is executed, and then we generate
optimized code for them.
>From this point on, a guard should check if all arguments remain the
same and, if so, the optimized code is run.
Otherwise, just fall back to the interpreter.
He! I have no idea how to implement it...
Any guru out there?
Luis
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
Luis Quesada writes:
[ id*v for id,v in enumerate(L) ]
Cool! Thanks!
If you really want to write that in pointfree style (untested):
import itertools, operator
...
itertools.starmap(operator.mul, enumerate(L))
For your other question, you could probably do
Duncan Booth wrote:
Luis Quesada wrote:
Is there a way
of writing the following without using zip:
map(lambda (id,v):id*v,zip(range(len(L)),L))
[ id*v for id,v in enumerate(L) ]
Cool! Thanks!
Cheers,
Luis
--
http://mail.python.org/mailman/listinfo/python-list
f(x):return x
return default
Thanks in advance for your answer!
Cheers,
Luis
--
http://mail.python.org/mailman/listinfo/python-list
On 26 mar, 11:49, kj wrote:
> What's the word on using "classes as namespaces"? E.g.
>
> class _cfg(object):
> spam = 1
> jambon = 3
> huevos = 2
>
> breakfast = (_cfg.spam, _cfg.jambon, _cfg.huevos)
I see no problem.
I wouldn't mix English, French and Spanish in the same recipe thou
Webmonkey, Greasemonkey, monkey-patching, Tracemonkey, Jägermonkey,
Spidermonkey, Mono (monkey in spanish), codemonkey, etc, etc, etc...
Monkeys everywhere.
Sorry for the off topic question, but what does "monkey" mean in a
nerdy-geek context??
Luis
--
http://mail.python.org/mailma
On Feb 21, 6:40 pm, Mensanator wrote:
> On Feb 21, 12:14 pm, Paul Boddie wrote:
>
>
>
>
>
> > On 21 Feb, 17:32, Mensanator wrote:
>
> > > On Feb 21, 10:30 am, Mensanator wrote:
>
> > > > What versions of Python does it suuport?
>
> > > What OS are supported?
>
> > From the Web site referenced i
On Mar 20, 12:04 am, Jimbo wrote:
> Hello
>
> I am trying to grab some numbers from a string containing HTML text.
> Can you suggest any good functions that I could use to do this? What
> would be the easiest way to extract the following numbers from this
> string...
>
> My String has this layout
ue be '1' etc.
>
> Pl. suggest.
>
> Thank you.
Check out this thread (very recent):
http://groups.google.com/group/comp.lang.python/browse_thread/thread/bb1797ffb6fc3bd7/25fe94103c7a231f?lnk=gst&q=luis+variables#25fe94103c7a231f
Short answer: you can update globals() wit
ything, since it's not a database server.
You simply save your databases as files.
If you don't know sql (the standard language used to query databases),
I recomend this online tutorial: http://www.sqlcourse.com/
Good luck!
Luis
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 24, 8:48 am, Bruno Desthuilliers wrote:
> Luis M. Gonz lez a crit :
> (snip)
>
> > Alright, this is what the docs say about locals:
> > "Note
> > The built-in functions globals() and locals() return the current
> > global and local dictionary, res
On Feb 24, 7:44 am, Luis M. González wrote:
> On Feb 24, 4:08 am, Steven D'Aprano
>
>
>
>
>
> wrote:
> > On Tue, 23 Feb 2010 20:44:10 -0800, Luis M. González wrote:
> > > On Feb 24, 1:15 am, Steven D'Aprano
> > > wrote:
> >
On Feb 24, 4:08 am, Steven D'Aprano
wrote:
> On Tue, 23 Feb 2010 20:44:10 -0800, Luis M. González wrote:
> > On Feb 24, 1:15 am, Steven D'Aprano
> > wrote:
> >> On Tue, 23 Feb 2010 19:47:22 -0800, Luis M. González wrote:
> >> > On Feb 23, 10:41 pm,
On Feb 24, 1:15 am, Steven D'Aprano
wrote:
> On Tue, 23 Feb 2010 19:47:22 -0800, Luis M. González wrote:
> > On Feb 23, 10:41 pm, Steven D'Aprano
> > wrote:
> >> On Tue, 23 Feb 2010 15:41:16 -0800, Luis M. González wrote:
> >> > By the way, if y
On Feb 23, 10:41 pm, Steven D'Aprano
wrote:
> On Tue, 23 Feb 2010 15:41:16 -0800, Luis M. González wrote:
> > By the way, if you want the variables inside myDict to be free
> > variables, you have to add them to the local namespace. The local
> > namespace is also a dic
On Feb 23, 7:56 pm, Luis M. González wrote:
> On Feb 23, 5:53 pm, vsoler wrote:
>
>
>
>
>
> > Hi,
>
> > I have two dicts
>
> > n={'a', 'm', 'p'}
> > v={1,3,7}
>
> > and I'd like to have
>
>
).
So going back to your question, you should have two lists, as follows:
n = ['a', 'm', 'p']
v = [1,3,7] --> note that I used brackets [], not curly
braces {}.
And now you can build a dict formed by the keys in "n" and the values
in "v":
myDict = {} --> this is an new empty dictionary
for k,v in zip(n,v):
myDict[k] = v
This results in this dictionary: {'a': 1, 'p': 7, 'm': 3}.
Hope this helps...
Luis
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 18, 5:21 pm, Daniele Gondoni wrote:
> On 18 Feb, 19:58, "sstein...@gmail.com" wrote:
>
> > Down from here (NH, US).
>
> > S
>
> > On Feb 18, 2010, at 1:44 PM, Chris Colbert wrote:
>
> Unreacheable from Italy as well...
Same here (Buenos Aires, Argentina).
--
http://mail.python.org/mailma
> Please don't post more noise and ad hominem attacks to the group, Steve.
"Ad hominem"?
Please, operor non utor lingua non notus per vulgaris populus.
Gratias ago vos...
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 18, 1:07 pm, Kit wrote:
> Hello Everyone, I am not sure if I have posted this question in a
> correct board. Can anyone please teach me:
>
> What is a list compression in Python?
>
> Would you mind give me some list compression examples?
>
> Thanks & really appreciate that.
> Kit
It's also
Hi
I am not an expert in programming and using Python for its simplicity
I have 2 versions of python installed on my computer (windos xp) to
begin the transition from version 2.4 to 2.6 or 3. maintaining the
operability of my old scripts
Is there any way to indicate the version of the python in
On Dec 18, 11:44 am, Virgil Stokes wrote:
> I have a rather large Java package for the analysis of networks that I
> would like to convert to Python. Many of the classes in the Java package
> are "Serializable".
>
> Any recommendations on Java-to-Python (2.6) would be appreciated.
>
> --V
Have yo
On Dec 6, 3:21 pm, vsoler wrote:
> I recently read that many libraries, including Numpy have not been
> ported to Python 3.
>
> When do you think that Python 3 will be fully deployed?
>
> Should I stick, so far, to Python 2.6?
>
> Regards
>
> Vicente Soler
You'll have some answers here:
http://j
"function" with a single argument, an iterable that
contains all the elements of xrange(10). You could be calling
foobar(j for j in xrange(10))
instead.
And I think I lost my way... I'm sleepy. If I confused you, sorry... and if
I'm helped you, thank you for letting me :D.
nds without having to change anyting from your part.
Simply code correctly your site in python or java, using Django or any
other wsgi compliant framework, and you are set to go.
Check it out: http://code.google.com/appengine/docs/whatisgoogleappengine.html
Luis
--
http://mail.python.org/mailman/listinfo/python-list
need to discard de old list, and get a new one. (1) would be the way to go.
Note that (2) and (1) are the same, in both you discard the old value, if it
exists, but in (2) you are creating a new list only to discard it right
away - you shouldn't do that.
> Am I correct wi
Quoting Andre Engels :
> On Sat, Nov 7, 2009 at 8:25 PM, Luis Alberto Zarrabeitia Gomez
> wrote:
> >
> > Ok, he has a dict.
> >
> > Now what? He needs a non-sparse array.
>
> Let d be your dict.
>
> Call the zeroeth place in your array d[0], the first
Quoting Bruno Desthuilliers :
> > Another situation where one may want to do this is if one needs to
> > initialize a non-sparse array in a non-sequential order,
>
> Then use a dict.
Ok, he has a dict.
Now what? He needs a non-sparse array.
--
Luis Zarrabeitia
Facult
the argument is a string before, it should do
the "".join instead of returning an error.
Also, why is there a special case for the strings, but not for the tuples?
Doesn't sum(((1,) for _ in xrange(100)),()) also have quadratic behaviour,
creating and destroying intermediate tu
he first one (now dereferenced and deallocated) used, so
> CPython gives it the same id value.
Wow, I never thought about it, but at least in my system, it seems to work like
that:
In [6]: id({1:2}) == id({3:4})
Out[6]: True
Interesting...
(only as a curiosity, though... One shouldn't re
On Monday 12 October 2009 09:47:23 am Xavier Ho wrote:
> On Mon, Oct 12, 2009 at 11:32 PM, Luis Zarrabeitia wrote:
> > Actually, in python, this works even better:
> >
> > for lin in iter(file_object.readline, ""):
> >... do something with lin
>
> Wh
ng with lin
Actually, in python, this works even better:
for lin in iter(file_object.readline, ""):
... do something with lin
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
justification", of
course that argument (and the one about the "gaps" themselves) will of course
seem singularly unpersuasive.
But if you see them as a "feature" (that may sometimes, albeit rarely,
missfire), then you would have no problem with /either/ argument.
--
Hello,
I have an object definition :
class primitive:
def __init__(self)
self.name = ""
self.transforms = []
def copy(self, copyName)
copy = self.copyInternalState(copyName) # method defined elsewhere
in derived class
if se
On Friday 31 July 2009 04:08:33 am Masklinn wrote:
> On 30 Jul 2009, at 23:57 , Luis Zarrabeitia wrote:
> > I'd like to ask, what "container.each" is, exactly? It looks like a
> > function
> > call (as I've learned a few posts ago), but, what are its
and return the instance).
3- You may want to take a look at metaclasses. But without more details about
why you want it, I can't give you more precise answers.
Regards,
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
Participe en U
nction
call (as I've learned a few posts ago), but, what are its arguments? How the
looping "works"? Does it receive a "code" object that it has to execute?
Is .each some kind of magic keyword? (This has little to do with python or
the current thread, so feel free t
uages do it? I've spent so much time with
python that reevaluating the default argument on invocation feels clumsy, but
I'm obviously tainted now...]
Regards,
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
Partici
id them, unless you have a /reason/ to do it.
Btw,
def get_color(point):
return screen[point]
is way more readable (and less obscure) than
def get_color(point):
return rows_of_pixels[point[0]][point[1]]
Regards,
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computa
r any object, not only int and floats.
===
def size(x):
try:
return len(x)
except TypeError:
return 1,1
===
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
Dear all,
I would like to know how to convert a list of points into a polygon
shapefile (esri).
Thanks!
Best regards,
Luis Pedro Almeida
--
http://mail.python.org/mailman/listinfo/python-list
ack on this thread and look at them.
heights = {}
heights[1,2] = 5
heights[1,3] = 7
heights[3,5] = 1
addresses[lastname, firstname] = my_home_address
census[location, age] = census.get((location, age), 0) + 1
All those are using tuples as dict keys.
Regards,
--
Luis Zarrabeiti
t;, but with the programmer.
The exact same behaviour could be obtained with
if int(inputValue) == 0:
inputValue = 25
and no "or" involved.
However, using only
inputValue = inputValue or 25
could have been an error if you only wanted 25 in case inputValue is None.
(the "or tr
boolean - if you
don't need anything else, treat it as such -, but it will be, whenever is
possible, one of the objects in the sequence, in case you need more info.
> without
> trying to find any intuitive/natural/obvious logic in it, knowing that
> sometimes the Truth lies far
PyPy. But I don't know how to use it.
With psyco, I used to include two statements roughly at the beginning of
the script:
import psyco
psyco.full()
With PyPy, is there a similar way to try to speed up my script?
Luis
--
http://mail.python.org/mailman/listinfo/python-list
Sun, 21 Jun 2009 13:04:59 +, Lie Ryan escreveu:
> Luis P. Mendes wrote:
>> Hi,
>>
>> I have a program that uses a lot of resources: memory and cpu but it
>> never returned this error before with other loads:
>>
>> """
>> Memory
M
I could not find this error. What does this mean?
Is this a bug of Python? of Psycopg2?
Luis
--
http://mail.python.org/mailman/listinfo/python-list
floor, but that doesn't matter. From the user's
perspective, there would be only functions: no strings, no objects, no numbers.
That reminds me of my last class (disclaimer: I teach discrete math). I told my
students "well, let's assume that numbers exist", and I wasn'
Well, these are a lot of questions and they only show my confussion...
I would highly appreciate if someone knowledgeable sheds some light on
this for me...
Thanks in advance!
Luis
--
http://mail.python.org/mailman/listinfo/python-list
On Wednesday 27 May 2009 04:26:57 pm Mark Dickinson wrote:
> Luis Zarrabeitia wrote:
> > On Thursday 21 May 2009 08:50:48 pm R. David Murray wrote:
> >> In py3k Eric Smith and Mark Dickinson have implemented Gay's floating
> >> point algorithm for Python so that t
e.gmane.org/gmane.comp.python.devel/103191/
Thank you.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
In [1]: def get_incrementor(n):
...: def inc(x):
...: return x+n
...: return inc
...:
In [3]: fs = [get_incrementor(n) for n in xrange(10)]
In [4]: fs[2](1)
Out[4]: 3
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~ky
n a listening socket in the "router"'s IP.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
6 without showing them what 0.2 /really/ means.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
y. If you need to correct yourself, reply to your own
message instead of opening a new thread.]
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
Quoting Carl Banks :
> I don't have any reply to this post except for the following excerpts:
>
> On May 20, 8:10 pm, Luis Alberto Zarrabeitia Gomez
> wrote:
> > 2- in [almost] every other language, _you_ have to be aware of the
> critical
> > sections when mul
Quoting Carl Banks :
> On May 20, 4:07 pm, Luis Zarrabeitia wrote:
> > On Wednesday 20 May 2009 06:16:39 pm Aahz wrote:
>
> The designers of Python made a design decision(**) that extension
> writers would not have to take care of locking. They could have made
> a dif
only reason for a GIL. After all, one could argue for that goal in
almost all languages.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
s an argument against removing the GIL. I
> want to remove the GIL. I'm only pointing out that removing the GIL
> is not easy, and once it's removed there is a cost.
Ah, allright then. Thanks for the clarification.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computac
an't be different from what Java, C# or any other languages do,
including C++. Why is that so expensive in python extensions, that it is used
as an argument against removing the GIL?
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~
on't mind doing instead:
f = file(something)
rest = parse_headers(f)
rest = parse_body(rest)
rest = parse_footer(rest)
you could return itertools.chain([pushed_back], iterator) from your parsing
functions. Unfortunately, this way will add another layer of itertools.chain on
top of the iterator
without having to change
the user's code.
[1] http://trucosos.crv.matcom.uh.cu/snippets/95/
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
luding the still unexistent but already know
function name, would guarantee that at least recursion calls the same function
instead of "whatever happens to be bound to their name at runtime". If it wasn't
a hack, anyway.
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
1 - 100 of 581 matches
Mail list logo