performance, perhaps?) to break
duck-typing in this situation?
Regards,
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
"Al mundo nuevo corresponde la Universidad nueva"
UNIVERSIDAD DE LA HABANA
280 aniversario
--
http://mail.python.org/mailman/listinfo/python-list
webmail didn't respect
the list* headers :(.
Thanks, Grant!
--
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
nable way, but still in good faith (I
believe). I wouldn't treat him so harshly, even though I didn't like being
asked to lie.
Anyway, I went to vote. I do use python with mysql.
Python seems to be winning by a 16% margin, more or less. Impressive... but
now I have to wonder how many p
idiom because you are speaking the wrong language.
You should be doing:
if "something" in "string":
do(something())
wich is clearer IMHO.
> cheers,
>
> -jelle
See ya,
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom
you files with pdb extension
and python in the name or contents, and the second one (quoted) should return
pages with both words together, except for commas, spaces, dots, slashs, etc.
However... one of the second query results is this thread in google groups...
not a good sign.
--
Luis Zarrab
e of python... I chose
python _because_ of it.
> and because it can also improve performance.
Btw, for performance, there is __slots__, with the side-effect that it forbids
attribute creation 'on the fly'.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http
should access it]
private = two leading underscores (name munging)
[only you should access - implementation detail.]
--
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
likely make
irrelevant if the members are private or public.
But, for trusted code? Or at least code known at compile time? It's just not
worth it... pylint should take care of that - and if it doesn't, the OP
should go fix it.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y C
and guess what, C# not only needs a word for
the concept of "objects should behave as you expect them to behave - we want
no barking cats, ever", but it is even not polymorphic by default (the
cursed "virtual" keyword).
--
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
On Wednesday 14 January 2009 11:18:51 am Paul Rubin wrote:
> Luis Zarrabeitia writes:
> > when you need to share some objects with potentially untrusted code
> > (like, a plugin system). You can't, and you shouldn't, expect that the
> > user will know what plugins h
On Wednesday 14 January 2009 11:45:46 am Paul Rubin wrote:
> Luis Zarrabeitia writes:
> > Why don't you do it backwards?
> > You *can* implement a metaclass that will remove the dynasmism from its
> > instances. Do it - I can give you a starting point if you wish.
>
On Wednesday 14 January 2009 12:54:13 pm Paul Rubin wrote:
> Bruno Desthuilliers writes:
> > You'll find successful "monster" projects written in
> > languages that are even more permissive than Python (C anyone ?),
>
> Could you name one written in C?
at could have been prevented with more compile time checking
> that made sure the structures understood by the one-off script matched
> the ones in the program that generated the input data.
Wait, do you _really_ believe that _static_ checks could prevent problems
arising from _unexpected_ c
Quoting Paul Rubin <"http://phr.cx"@NOSPAM.invalid>:
> Luis Zarrabeitia writes:
> > Wait, do you _really_ believe that _static_ checks could prevent problems
> > arising from _unexpected_ conditions in the _data_?
>
> The data does not arrive from outer spa
you can usually access the privates anyway - it's just a bit harder to do, and a
lot harder to discover.
You pointed out previously that Python wasn't up to the task of running
untrusted code on my own application, and I agreed. _That_ is what you seem
need, and enforced data hiding
enforced data hiding. You want something actually designed
to try to prevent abuses from hostile programmers - go use .Net or Java, who
attempt to do that (I don't know with what level of success, but they at least
provide you the 'locks' and 'police' that you need).
rty access in C# is exactly the same. (Could it be
that even if the syntax is the same, the compiled code differs? Don't know
enough about .NET to answer that).
I think I'm getting offtopic now. I better leave :D
[snip the rest of the email, as I agree with it]
--
Luis Zarrabeitia
F
capsulate it later without
> breaking the client's code.
Python programmers don't _need_ to plan ahead and encapsulate the radius from
the start. That's the whole point. No clairvoyance needed. I kind of like that.
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
Quoting Luis Zarrabeitia :
>
> Quoting "Russ P." :
>
> > On Jan 19, 6:24 pm, "James Mills"
> > wrote:
> >
> > > Python programmers tend to not have a need for
> > > properties. Quite honestly they are a waste of time.
one I'm using right now (Horde/Imp), your only option is to
reply-to-all and then delete the original sender. I can't blame anyone for
forgetting about the last part.
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
Quoting "Russ P." :
> On Jan 19, 5:09 pm, Luis Zarrabeitia wrote:
>
> > Russ, I think _you_ are missing the point.
> > If the attribute is already public, why does it need properties? Why would
> a
> > programmer go to the trouble of adding them
lic interface, you shouldn't change it... But, if you
absolutely have to do it, complain loudly and as soon as possible. In python,
I'd say that [a subclass of?] AttributeError would be the best solution for this
ill-advised situation.
--
Luis Zarrabeitia
Faculta
Quoting Paul Rubin <"http://phr.cx"@NOSPAM.invalid>:
> Luis Zarrabeitia writes:
> > > Luis Zarrabeitia writes:
> > class ImmutableType(type): ...
>
> Thanks for posting this, I haven't replied because I bookmarked the
> post for later study,
tion'?). It was a counterexample for your trust on
compiler checks.
Btw, what do you have against using pylint for detecting those 'access
violations'?
> If that reasoning is sound, think about what else is useless.
I _hope_ that wasn't Bruno's reasoning. I don't want to switch sides on this
discussion :D.
Cheers,
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
On Tuesday 20 January 2009 02:00:43 am Russ P. wrote:
> On Jan 19, 10:33 pm, Luis Zarrabeitia wrote:
> > (Why do you keep calling it 'encapsulation'?).
>
> I keep calling it encapsulation because that is a widely accepted,
> albeit not universal,
On Tuesday 20 January 2009 05:00:34 am Paul Rubin wrote:
> Luis Zarrabeitia writes:
> > No wonder you can't get Bruno's point. For the second, static checks
> > to prevent accidents, you have pylint. For the first, not only you
> > are using the wrong tool, but yo
to be _part of the standard_
library (or whatever).
If you need it in your project, _use_ it. If you don't, then don't use it. If
_you_ need that thing you call security, just use it already and quit
complaining that we don't use it. Is there a policy in your project that you
On Tuesday 20 January 2009 09:52:01 pm Paul Rubin wrote:
> Luis Zarrabeitia writes:
> > > Whaat? Assuming a program is perfect unless a failure is proven
> > > is not at all a sane approach to getting reliable software. It is
> > > the person claiming perfection w
On Wednesday 21 January 2009 02:03:07 pm Paul Rubin wrote:
> Luis Zarrabeitia writes:
> > But somehow the discussion shifted from an optional requirement (giving
> > you the chance to explicitly use 'from lock import unlock; o =
> > unlock(obj)') to "it
On Wednesday 21 January 2009 04:16:38 pm Russ P. wrote:
> On Jan 21, 9:34 am, Luis Zarrabeitia wrote:
> > But you keep failing to explay why do you need it to be _part of the
> > standard_ library (or whatever).
>
> Technically, it doesn't need to be. But if someone p
; ... __colour = 'blue'
> ... def __str__(self):
> ... return 'A %s parrot' % self.__colour
> ... __repr__ = __str__
> ...
>
> >>> class RedParrot(Parrot): # Just like Parrot, only red.
>
> ... __colour = 'red'
>
On Friday 23 January 2009 06:31:50 am Antoon Pardon wrote:
> On 2009-01-16, Luis Zarrabeitia wrote:
> > Quoting "Russ P." :
> >> If you "*shouldn't* mess with the implementation", then what is wrong
> >> with enforcing that "shouldn'
Quoting Steven D'Aprano :
> On Fri, 23 Jan 2009 13:07:55 -0500, Luis Zarrabeitia wrote:
>
> > It should be in _our_ power as the team of all participant coders on
> > _our_ project to decide if we should mess with the internals or not.
> >
> > What makes n
Quoting "Russ P." :
> On Jan 23, 6:36 pm, Luis Zarrabeitia wrote:
>
> > > Makes *no* sense? There's *no* good reason *at all* for the original
> > > author to hide or protect internals?
> >
> > My bad, sorry.
> > It makes sense... if
Quoting Steven D'Aprano :
> On Fri, 23 Jan 2009 21:36:59 -0500, Luis Zarrabeitia wrote:
>
> > Quoting Steven D'Aprano :
> >> Makes *no* sense? There's *no* good reason *at all* for the original
> >> author to hide or protect internals?
> &g
quot; every time an attribute is
> accessed that it is not a private attribute.
I think that was a reply to a message where I said that I used pylint run those
checks on third party libraries. And I obviously can do the same with my own
code. I don't have threading now, so I can't ch
Quoting "Russ P." :
> On Jan 24, 9:54 pm, Luis Zarrabeitia wrote:
> > Quoting "Russ P." :
> >
> > It is. For starters, I'd lose the information of "this attribute was
> intended to
> > be internal and I'm accessing it anyway".
e person. I have serious problems with names.
[My apologies to both of you, if I said something that made you notice my
confusion].
P.S: Just to be clear, I'm neither Russ P. nor Paul Robin :D
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.c
h, as
someone pointed out before me, can be done with tools like pylint). The
objection is about the _user_ of the library. If you don't force it into the
_user_, how is it different from the current situation? And if you do force
it, how can you say that it is optional?
--
Luis Zarrab
On Tuesday 27 January 2009 02:56:51 pm Russ P. wrote:
> On Jan 27, 11:40 am, Luis Zarrabeitia wrote:
> > I think you still fail to see that what we are objecting is not that the
> > original writer can "optionally" use the enforced data hiding (which, as
> > someon
the dot is "self". If you can't trust yourself to access only
the well identified "public" attributes, how can you trust that you will just
not make "public" a private attribute anyway?
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
ical* given the current design of Python.
Well, then. Do you want dynamic checks? Go fix Bastion/rexec (that would be a
_good_ thing, valuable for way more than data hiding). Or do you want static
checks? In that case, you have it already.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemátic
complaint has nothing to do with enforced vs
not-enforced data hiding, and everything to do with static typing. And mind
you, must of us who use python, do so _because_ of the dynamism and not in
spite of it.
Funny thing is, you have the choice, _now, today_, of having your precious
sta
the interpreter will simplify
them more than having the checks on an external tool?
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
ain.
>
Please, point out where, because I don't recall you explaining why is not enough
to use a "validation script" on the code if you wish to. I _do_ recall you
saying that you didn't want the validation script unless it is integrated with
python, but I'm yet to
position: you can easily _check_
that everything is alright before executing, whereas in the office example, it
cannot be done.
Of course, if the analogy is flawed in such an essential aspect, I won't even
humor it. I worry, though, that you obviously believe that it is not flawed.
--
Luis
On Wednesday 04 February 2009 10:53:54 am Russ P. wrote:
> On Feb 4, 5:35 am, Luis Zarrabeitia wrote:
> > Quoting "Russ P." :
> > This analogy is nonsense. There is no way you will execute code on my
> > system if I don't authorize it, regardless of how "
but I don't want to keep that script on the global python path nor on any
of the project folders (it is required by more than one).
Currently I have a symlink from the original modify_pythonpath.py to each
project directory, but that seems clumsy.
--
Luis Zarrabeitia
Facultad de Mat
p(a.age)
and always get "stores the age of the person", I don't think python has any
syntactical way of doing that. You could simulate it using properties, though
(do a 'help(property)' to see an example), but I'm not sure if that will be a
good solution.
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
Quoting James Stroud <[EMAIL PROTECTED]>:
> First, here is why the ability to throw an error is a feature:
>
> class Apple(object):
>def __init__(self, appleness):
> self.appleness = appleness
>def __cmp__(self, other):
> assert isinstance(other, Apple), 'must compare apples t
l.
Even the transition itself could be done without breaking much code... Make the
== op return an object that wraps the array of bools (instead of the array
itself), give it the any() and all() methods, and make __nonzero__/__bool__
equivalent to all().
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
On Wednesday 10 December 2008 10:50:57 am M.-A. Lemburg wrote:
> On 2008-12-10 16:40, Luis Zarrabeitia wrote:
> > Quoting Rasmus Fogh <[EMAIL PROTECTED]>:
> >> Rhamphoryncus wrote:
>
> Rich comparisons were added to Python at the request of the
> Numeric (now num
n the way to test for equality should be the equality test.
> > I'm certain that something could be worked out. A quick paragraph that
> > took me just a few minutes to type shouldn't be construed as a PEP that
> > will solve all the problems :D.
>
> As always: t
e(a, numpy.array) or isisntance(b,numpy.array):
res = compare_numpy(a,b)
elif isinstance(a,some_otherclass) or isinstance(b,someotherclass):
res = compare_someotherclass(a,b)
...
else:
res = (a == b)
if res:
# do whatever
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computaci
prefix - if that were the case, what magic would
you propose for the compiler to guess when you are referring to locals, globals,
class or instance variables?)
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
e behavior.
The stdin.readline() function doesn't share that behaviour (it returns as soon
as I hit 'enter').
??Is there any way to tell stdin's iterator not to buffer the input? Is it
part of the standard file protocol?
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Mate
ill stands (how to turn off the buffering), but this is a nice
workaround until it gets answered.
--
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
On Tuesday 07 October 2008 05:12:28 pm Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, Luis
>
> Zarrabeitia wrote:
> > I have a problem with this piece of code:
> >
> >
> > import sys
> > for line in sys.stdin:
> > p
the size argument is negative or omitted, read until EOF is reached.
Notice that when in non-blocking mode, less data than what was requested
may be returned, even if no size parameter was given.
=
But it doesn't say how to put the file object in non-blocking mode. (I was
trying t
e to leak the internals of the parsers to the outside.
What could I do?
(to the curious: the format is a dialect of the E00 used in GIS)
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
27; variables.
> If you don't understand that, or are
> happy without having the choice, and have no answer to the question I
> was asking, then that's fine.
I believe he had an answer... You didn't like it, though. I hope mine was more
palatable to you.
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman/listinfo/python-list
e, but I wanted to explore possible alternatives.
Fair enough.
> >> I understand very well when data should be stored as instance data,
> >> and when it
> >> should be instead tucked away as static data within a method.
> >
> > OT: Please enlighthen me. I
ists
None
---
Versus:
---
>>> import django
>>> print django
>>> import i_hope_this_doesnt_exists
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named i_hope_this_doesnt_exists
---
ipython also gets broken after the import (not
On Tuesday 24 February 2009 05:57:52 pm Lionel wrote:
> from win32api import GetSystemMetrics
I'd guess that win32api is patform specific, as in "api for win32".
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http
y, then it would be kind of irrelevant if it is on the stdlib or
not.
Of course, this only applies if you want to paint and your api provides that
info.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie
--
http://mail.python.org/mailman
nces are that you will love DrProject.
It's quite good (and easy to install, unlike gforge), but the developers are
moving on to a version 2.0 that you can find around here:
http://basieproject.org/ (yeah, the website is ugly).
If you like trac, take a look at DrProject and keep an e
u also need to create all the intermediate folders
from "output_folder" to "output_folder/name" (assuming that 'name' has several
path parts in it)? Is there any elegant way to do it?
(is there any way to make os.mkdir behave like mkdir -p?)
--
Luis Zarrabeitia
Fa
ial written for Python
> 3 however there are enough to get going: most of the Python 2
> tutorials are redundant. Sticking to Python 3 tutorials will give him
> a higher signal-to-noise ratio in the tutorials that he finds.
That is true. We need python tutorials aimed at python2.6 :D
--
cial_methods__ should be avoided. That one is a
better idiom.
Works for python2.4 and 2.5 also.
In python3, this should be used instead:
>>> b = iter(a)
>>> c = next(b)
(btw, I love the new sentinel argument for the next function in python3!)
--
Luis Zarrabeitia
Facult
>
> But it does have a 'default' argument, and you can pass that
> a sentinel, so it amounts to the same thing ;)
Yep, that's what I meant, I forgot the parameter name.
--
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
iter(lambda: f.read(1000),''):
do_something(buff)
but I don't really like a lambda in there. I guess one could use
functools.partial instead, but it still looks ugly to me. Oh, well, I guess I
also want to see the canonical way of doing it.
--
Luis
Quoting Jim Garrison :
> Jim Garrison wrote:
> > Luis Zarrabeitia wrote:
> >> On Tuesday 17 March 2009 06:04:36 pm Jim Garrison wrote:
> >> with open(filename, "rb") as f:
> >> for buf in iter(lambda: f.read(1000),''):
> >
syntax? (the one
that python documentation viewers understand better? the one used by the
stdlib?) How should/in what order should I write the docs? (brief description,
argument types, return type, followed perhaps by some doctests).
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http
#x27;re used for the std lib's very
> spiffy new docs. See the Sphinx homepage for how to learn the syntax.
>
> Cheers,
> Chris
That was quick! Thanks! Opening the page now.
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
Participe
confusion.
/me wonders how no one on this thread suggested that before.
That seems like a pretty simple and clear fix to all this thread.
+100^2
--
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
lain as loudly as possible
if they want to break encapsulation.
--
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
that's unfortunate.
Btw, when I re-read my phrase by itself, it seemed hostile... My apologies.
I'm still not very good at expressing my thoughts in english.
Then, I guess, you have little choice. Mangle the name, hope that the server
will get fixed.
--
Luis Zarrabeitia (aka Kyrie)
F
for this? (raise the exception when the queue is
exhausted, not when it is closed by the producer).
--
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
ould be still cheaper to scp the files.
Now, if I only had a third core available to consume a bit faster ...
Regards,
--
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
advantage on having it as a keyword, though: it would make
static analisis easier)
--
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
ucks.
[I'm not a lisp user, but I tend to think recursively anyway...]
--
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
t allow that easier implementation to be
efficient enough.
Programming languages suck, but that shouldn't mean that we can't hope to
improve them.
--
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
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
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/~
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
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
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
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
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
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
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
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
your frontpage than with the extra few milisenconds
achieved by switching the programming language or throwing another server in
the cluster.
--
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
On Thursday 15 May 2008 09:32:37 am castironpi wrote:
> Why can't I write this?
> --
> http://mail.python.org/mailman/listinfo/python-list
yield recieved.
Thanks.
--
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/
uot;b" mode. Worst thing is... I don't really need that character, just a
general idea of how the document looks like.
--
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
like it
is working with 'is' at first, but it really isn't:
In: a="hi"
In: b="hi"
In: a is b
Out: True<-- dark magic here, python optimized the string storage,
In: a is "h"+"i" <-- by using the same object instead of creating
he features we've always wanted, to the next
major version of Python.
--
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
ut "the next mayor version of python". With a clean, well documented,
upgrade path.
Unlike "next month's Flaming Thunder". (Unless you are producing a new major
version every week, in which case I shut up, and may think about buying several
versions only so you must keep
at home] version
of 'factorial'.
So, you understood well.
As I haven't been following this thread, I won't go offtopic talking about
functional languages. But yes, on functional (and declarative?) languages, it
makes a lot of sense to have a 'symbol' that represents a new
> raise letters.StopIteration()
>
I must say, I don't even like the idea of having a 'break', but I kind of like
this proposal.
However, it may be ambiguous [is that a word?] if the outer and inner for loop
over the same object. Weird/unlikely situation, I kn
1 - 100 of 125 matches
Mail list logo