rs. I can't imagine that the size of an uncompressed
lnotab would be a problem in this day and age.
If ordering is an issue, generate it internally as a
dict and convert it to a sorted list on output.
--
Greg
___
Python-Dev mailing list
Python-Dev@
f you add a matrix and a plain numpy
array, what type should the result be? If plain
numpy arrays can be used directly as matrices, that
problem goes away.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo
.
What's more, it doesn't address the real problem at hand,
which is providing a notation for matrix multiplication
that is concise enough to be used *very* frequently --
like multiple times in every line of code that manipulates
matrices.
--
Greg
alk about wanting to using numpy.array.
Yes -- what's wrong with that?
How does this not make it clear that there is not a case of TOOWTDI?
I think there *is* one obvious way of representing a matrix,
or any 2D array, using built-in Python types, or rather two
ways -- a list
s well.
The trouble is that, for the people who badly want
a matrix multiplication operator, 3 characters is
far too long!
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
ht
notation was
added purely for use by Numeric and its successors, and
nothing in core Python attaches any meaning to it.
How do the PEPs work?
Someone writes a PEP. People talk about it. Eventually, Guido
either accepts it or rejects it (although in some cases it
is an infinitely long time be
(e, f)
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
be totally outlandish to propose A**B for matrix
multiplication? I can't think of what "matrix exponentiation" would
mean...
But ** has the same problem -- it already represents
an elementwise operation on numpy arrays.
--
Greg
___
Python-De
o use heavily.
In MATLAB, the elementwise operations are probably
used fairly infrequently. But numpy arrays are often
used to vectorise what are otherwise scalar operations,
in which case elementwise operations are used almost
exclusively.
--
Greg
___
P
has some unicode symbol for it
(I suppose that would be one desperate possibility).
I've been carefully refraining from suggesting that.
Although now that unicode is allowed in identifiers,
it's not *quite* as heretical as it used to be
Martin v. Löwis wrote:
(maybe the use of the question mark is more typical in German
than in English; my stomach turns around when I read a question
that ends with a full stop)
No, it's required in English, too.
--
Greg
___
Python-Dev ma
oding routines I wrote.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
g how to reduce
the number of ways of copying a list, but Google
doesn't seem to want to find it.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailma
x.a = Foo()
>>> del x.a
__del__
Exception exceptions.AttributeError: "'Foo' object has no attribute 'a'" in
> ignored
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
ementation should do its own
%PATHEXT% lookup when the shell is not being used.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/arch
example of this where multiple
inheritance is actually used?
A non-contrived example or two would be a good thing to
have in tutorials etc. where super() is discussed. It
would help to convey the kinds of situations in which
use of super() is and is not appropriate.
--
Greg
M.-A. Lemburg wrote:
The typical use is in mixin classes that can be used to
add functionality to base classes...
But this is just another waffly made-up example. I'm
talking about real-life use cases from actual code
that's in use
he source file for a module, regardless of whether it
was loaded from a .py, .pyc or .pyo.
Maybe there should be a __source__ attribute for that?
Or is os.path.splitext(M.__file__)[0] + ".py" considered
good enough for that?
--
Greg
___
Pyth
under
a lower-case name, that can be replaced with a
factory function later.
In this case, the thing to decide is whether
Event will always be a direct class instantiation.
If so, rename _Event to Event and expose it
directly. If not, rename Event to event.
--
Greg
could be categorized.
Is this particular one so important that it warrants
a naming convention?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailma
not* being classes, and
that seems rather unlikely).
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
oss a situation where
allowing read(0) to occur would have simplified the
code. In the usual keep-reading-until-we've-got-the-
required-number-of-bytes scenario, you're checking
for 0 bytes left to read in order to tell when to
stop.
--
Greg
__
s as an EOF condition.
However, with some devices it's possible for what
counts as EOF to happen more than once, e.g. ttys.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
do on Unix?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
ption. I'm not sure about
having it disabled by default, though, since naive users
are the ones that stand to benefit most from it, yet
they're least likely to know that they need to turn it
on.
--
Greg
___
Python-Dev mailing list
Python-De
Eric Smith wrote:
But I agree that
managing a single batch file is easier than dealing with the PATH
variable, and has fewer side effects (finding DLL's, etc.).
This would only be possible for an administrator
installation, though, not a per-user one.
--
uot;python" refer to the most recently
installed version, at least for 2.x, and it's not
considered a problem there.
In the case of 3.0, didn't we decide not to do that?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.py
t file.
Instead of a bat file, maybe generate a small exe
that does the job?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
stribution, just the stdlib modules the app actually uses.
So it's not as bad as including a whole Python installation
for every app.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe
he program,
get to see the output before the window disappears, etc.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/arch
broken or legacy?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
ay on some unsuspecting user that doesn't have the
inclination to go diving into the code to fix it.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman
more than newlines -- it saves the code
to set up and append to a list. This is a substantial
improvement when this code would otherwise swamp the
essentials of what's being done.
This doesn't apply to a plain for-loop that's not
building a
Nick Coghlan wrote:
it was
just odd to notice that the Py3k interpreter would quite happily execute
the example code in my postscript when I had really only intended to
write it as pseudo-code with sections missing.
Well, they do say that Python is executable
pseudocode. :-)
--
Greg
Kristján Valur Jónsson wrote:
Using new style classes to provide attribute-like access using
__getattr__ is considerably slower than old style classes
Do you really need __getattr__, or could you use
properties instead?
--
Greg
___
Python-Dev
ed by Python
code.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
alue separation gone away
completely, or is it still there at the C level?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
s a bug or not. It's
not clear what the app name *should* be when you use
-c. What do the python-dev folks think?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.py
ses of the switched-to
code as the virtual instruction opcodes, so the dispatch
is just an indirect jump.
I'm having trouble seeing how that would help with
branch prediction, though -- seems to me it should make
it worse if anything, since the CPU has no idea where
an indirect jump is going
hings like
attribute lookups and function calls, rather than
fiddling with integers in local variables.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/ma
Guido van Rossum wrote:
there already is something else called VPython
Perhaps it could be called Fython (Python with a Forth-like VM)
or Thython (threaded-code Python).
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http
with machine
generated code would be a step away from that.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail
er for the reader to learn about.
I'm not saying this is a bad enough problem to stop it
being done, just that it's something to consider that isn't
necessarily on the positive side.
--
Greg
___
Python-Dev mailing list
Python-Dev@python
to be rewritten
in a completely different way. Just changing the VM
isn't going to make a difference to that.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.pytho
ut my guess is that it would help about the same
amount as it would help non-Stackless Python, i.e. there's
not much about stacklessness per se that makes it particularly
beneficial to have a generated VM.
--
Greg
___
Python-Dev mailing list
Python-Dev@
get pauses occurring at random times.
Sometimes in games I've found that I had to disable cyclic
GC in order to get smooth frame rates. With no refcounting
I wouldn't have the option of doing that. I'd be disappointed
if that meant I could no longer use Python for these
n brain. I have enough
trouble keeping the intricacies of hg in my head from
one session to the next. I wouldn't relish the idea
of having to use another similar-but-not-quite-the-same
tool at the same time.
--
Greg
___
Python-Dev mailing list
Python
Python distribution
for Windows wouldn't be compiled that way, so it wouldn't
have any GMP-related code in its dll.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscr
;re just shipping
an unmodified GMP library.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
them.
Considering that Pyrex favours efficiency over compatibility
with Python where there's a conflict, it would perhaps be
more appropriate for standard library use, if such a thing
were to be considered at all -- which doesn't seem very
likely in the near f
of course, to make one of
the existing VCSes written in C available as an extension
module. :-)
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/opti
int32 * my_other_uint32 and the other
using my_uint64 * my_other_uint64, and seeing whether one is
faster than the other?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.pytho
Terry Reedy wrote:
Math is pretty much float, not int functions.
Also, it's supposed to be confining itself to
wrapping the C math library.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/p
Antoine Pitrou wrote:
As for numbits, I think it should be a method
It feels more method-like to me too, because it's something
derived from the int's value rather than an independent
piece of information.
--
Greg
___
Python-Dev mailing l
Aahz wrote:
What do you call Decimal? ;-)
If you're working with decimal numbers, you're more
likely to want a numdigits() method.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/
d into the openssl extension module
instead? It's already assumed that Python extension modules
are linked against the correct version of the runtime for
the python.exe being used.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://
Mark Hammond wrote:
The only conflict I see here is the requirement to install into "\Program
Files"
Doesn't that just mean that if an OEM decides to preinstall it,
they need to put it in Program Files? They're at liberty
any
replacement __import__ functions will be required to
conform to the new interface, and existing ones will
no longer be valid.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://
Nick Coghlan wrote:
For binary wrappers around the Windows Unicode APIs, I was thinking
specifically of using UTF-8, since that should be able to encode
anything the Unicode APIs can handle.
Why shouldn't the binary interface just expose the raw
utf16 as bytes?
--
ble-sized
shape and strides arrays, it has to manage the memory
for them somehow.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev
tride
arrays for its particular view of the underlying object.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
long as they're
needed.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
them
when releasebuffer is called."
Even allowing this seems rather dubious to me. I suppose
there's no serious danger as long as the block of memory
ultimately holding the data doesn't move or change size,
but changing the shape could confuse a buffer user that's
ite
e basic idea is sound:
that Py_buffer objects are ephemeral, to be obtained when
needed and not kept for any longer than necessary.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
n file object before forking
or (b) use os.write() directly on the fd to avoid the buffering.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/option
alid slice could still
fail.
In any case, I think it should be possible to implement
either version without the memoryview having to own
more than one Py_buffer and one set of shape/strides
at a time. Slicing the memoryview creates another
memoryview with its own Py_buffer and shape/strides.
--
Gre
uffer structures.
To be precise, the important thing is for the memoryview to allocate
its own shape and strides. It's not strictly necessary to keep them
internally in a Py_buffer struct, although that may be a convenient
way to do it.
--
Greg
___
e you another
set of shape/strides info describing the slice.
It seems sensible to put the effort into doing this
correctly once, rather than leave everyone implementing
a memoryview-like object to come up with their own
half-working and/or broken implementation.
--
some
utilities for doing things like this could be useful, as I
mentioned in another post.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/pyt
Antoine Pitrou wrote:
I've proposed a patch
which basically implements Martin's suggestion in
http://mail.python.org/pipermail/python-dev/2008-June/080579.html
Is anybody opposed to the principle of this proposal?
Sounds okay to me
Nick Coghlan wrote:
Actually, I believe 3.0 already took a big step towards allowing this by
changing the way modules are initialised.
It's a step, but I wouldn't call it a big one. There are
many other problems to be solved before fully independent
interpreters are possible
reters. In the Apache case, it's
probably more about providing virtual Python environments than
free-threading between interpreters.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Uns
necessarily a *convenient* way...
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
e were used.
Maybe apply() could be reinstated and put into
the operator module?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
using generators as coroutines more convenient,
and I came up with the idea of a new statement
call expr
which would be equivalent to
for x in expr:
yield x
This happens to be the same as what "yield *"
would do, so it kind of unifies the two i
chunk of code from
a generator that contains a 'yield' and put it
into another function, and then call it in
a way that resembles an ordinary function call
as closely as possible.
Maybe 'call' isn't the best word for that, bu
Stephen J. Turnbull wrote:
Greg Ewing writes:
> The fact that yielding is going on is not of
> interest in that situation
But doesn't "yield" in the sense of "yield the right of way" mean
exactly that?
I've no problem with using 'yield' when a
Benjamin Peterson wrote:
why would you use Ellipsis outside of slices?
I could imagine someone wanting to use it as part of a
function API. For example,
print(a, b, c, ...)
would have been a nice way to tell print() not to put
a newline on the end.
--
Greg
Sturla Molden wrote:
With one interpreter per thread, and
a malloc that does not let threads share memory pages (one heap per
thread), Python could do the same.
Wouldn't that be more or less equivalent to running
each thread in a separate process?
--
f the code-unit
level is hidden from the programmer?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
, but that's easily defensible as a tradeoff to conform to
underlying runtime semantics.
I would only agree as long as it wasn't too much worse
than O(1). O(log n) might be all right, but O(n) would be
unacceptable, I think.
--
Greg
___
Python-D
be no need to use surrogates in the first
place.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
this also.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
tions perpetually in catch-up mode.
My suggestion on how to address this would be something akin
to Pyrex or Cython. I gather that there has been some work
recently on adding different back-ends to Cython to generate
code for different Python imple
l the
macros, interprets the struct declarations, etc. All you
need to do when writing the .pyx file is follow the same
API that you would if you were writing C code to use the
library.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
Guido van Rossum wrote:
On Mon, Aug 29, 2011 at 2:17 PM, Greg Ewing wrote:
All you
need to do when writing the .pyx file is follow the same
API that you would if you were writing C code to use the
library.
Interesting. Then how does Pyrex/Cython typecheck your code at compile time?
You
ng to perform heroic optimisations.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
in all-caps, and some of them have accents:
http://www.happymall.com/france/paris_street_signs.htm
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman
nglish too -- occasionally
you see words like "cooperation" spelled with a diaresis
over the second "o". But these days it's more common to
use a hyphen, or not bother at all. Everyone knows how
it's pronounced.
--
Greg
___
Python-Dev
diaeresis on
its side:
co:operate
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Antoine Pitrou wrote:
I don't think some American souvenir shop is a good reference, though :)
(for example, there's no Paris street named "château de Versailles")
Hmmm, I'd assumed they were reproductions of actual
street signs found in Paris, bu
a lot
more often than we hear them spoken. Why shouldn't we
change the pronunciation to match the spelling rather than
the other way around?
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Uns
er" as
opposed to "empty string" or "null pointer").
I expect it's 3 chars for consistency with all the other control
character names.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman
y to go in the future.
I'm glad to hear that .NET isn't going to take over the
world after all!
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/ma
license" for more information.
>>> a = xrange(5)
>>> b = xrange(5)
>>> a > b
True
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
wants start/end/count I think there's nothing wrong with
computing end = start + step*count.
+1, that makes sense to me.
And I don't like "linspace" either. Something more self
explanatory such as "subdivide" or &quo
se
it was using some special technique to maximise numerical
accuracy.
But from this it seems like it's just using the naive
algorithm that we've already decided is not the best.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http:
Alexander Belopolsky wrote:
("Comb" (noun) brings up the right image, but is probably too
informal and may be confused with a short for "combination.")
And also with "comb filter" for those who are into
signal processing.
--
Greg
Ethan Furman wrote:
If it's generic, why should it live in math?
Generic? Maybe that's it: grange()
It's also an English word, unfortunately one with a
completely unrelated meaning. :-(
--
Greg
___
Python-Dev mailing list
Python
ctably and accurately with
floats
extrapolate(start, step, end)
Works for any type supporting addition, not
recommended for floats
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/
1701 - 1800 of 2499 matches
Mail list logo