This cannot work, because Foo_Type is no PyObject but a PyVarObject
(independent
of the use of PyVarObject_HEAD_INIT or PyObject_HEAD_INIT). The code
line would
work so:
((PyObject *)Foo_Type)-ob_type = PyType_Type
However, this is not what you should use. Instead, use
Py_Type(Foo_Type)
Paul Rubin wrote:
Terry Reedy tjre...@udel.edu writes:
To post from g.c.p.g, one must use a real email address and respond
once to an email sent to that address.
So, the only reason to use c.l.p is if one wants to post anonymously,
like the spammers do ;-).
No I don't think so. Unwilling to
r wrote:
On Nov 14, 4:52 pm, Terry Reedy tjre...@udel.edu wrote:
So, the only reason to use c.l.p is if one wants to post anonymously,
like the spammers do ;-).
I don't think that completely correct. Lots of people find GG's to be
more suited to their news reading pleasures,
I was referring
Ben Finney wrote:
Terry Reedy tjre...@udel.edu writes:
So, the only reason to use c.l.p is if one wants to post anonymously,
like the spammers do ;-).
Or if one has an ISP who provides a Usenet feed, like mine does.
Gmane is a nntp news feed, just not a usenet feed. If you can read
This whole thread has now proceeded to bore me senseless. I'm going to respond
once with a restatement of what I originally said. Then I'm going to drop it,
and
never respond to the thread again. Much of what's below has been said by others
as well; I'm taking no credit for it, just trying to
Chris Rebert wrote:
On Sat, Nov 14, 2009 at 3:25 PM, AON LAZIO aonla...@gmail.com wrote:
Hi, I have some problem with object reference
Say I have this code
a = b = c = None
slist = [a,b,c]
Values are stored in the list, not references to names.
That is not right either, or else newbies
On Sat, Nov 14, 2009 at 6:53 PM, Terry Reedy tjre...@udel.edu wrote:
Chris Rebert wrote:
On Sat, Nov 14, 2009 at 3:25 PM, AON LAZIO aonla...@gmail.com wrote:
Hi, I have some problem with object reference
Say I have this code
a = b = c = None
slist = [a,b,c]
Values are stored in the list,
On Fri, 13 Nov 2009 18:25:59 -0800, Vincent Manis wrote:
On 2009-11-13, at 15:32, Paul Rubin wrote:
This is Usenet so
please stick with Usenet practices.
Er, this is NOT Usenet.
Actually it is. I'm posting to comp.lang.python.
1. I haven't, to the best of my recollection, made a Usenet
On Fri, 13 Nov 2009 07:53:05 -0800, Michele Simionato wrote:
I am skeptical about the utility of both rating and comments. If
somebody wants to know
if a package is good, she should ask here.
Because unlike people writing comments, people here are never
incompetent, misinformed, dishonest,
On Fri, 13 Nov 2009 21:26:01 +, kj wrote:
...just bit me in the fuzzy posterior.
It's not a bug. Just because it doesn't behave as you would like it to
behave doesn't mean it isn't behaving as designed.
The best I can come up with is the hideous
lol = [[] for _ in xrange(500)]
On Sat, 14 Nov 2009 11:14:04 +, kj wrote:
In 7xpr7lixnn@ruckus.brouhaha.com Paul Rubin
http://phr...@nospam.invalid writes:
It seems a little weird to me that they (Google) are concerned with the
speed of the compiler, indicating that they plan to write enormous
programs in the
On Sat, 14 Nov 2009 07:48:39 -0800, Roy Smith wrote:
I'm converting some old bash scripts to python. There's lots of places
where I'm doing things like rm $source_dir/*.conf. The best way I can
see to convert this into python is:
configs = glob.glob(os.path.join(source_dir, '*.conf'))
Steven D'Aprano wrote:
On Wed, 11 Nov 2009 16:38:50 -0800, Vincent Manis wrote:
I'm having some trouble understanding this thread. My comments aren't
directed at Terry's or Alain's comments, but at the thread overall.
1. The statement `Python is slow' doesn't make any sense to me. Python
is a
On Fri, 13 Nov 2009 14:10:10 -0800, scoopseven wrote:
I actually had a queryset that was dynamically generated, so I ended up
having to use the eval function, like this...
d = {}
for thing in things:
query_name = 'thing_' + str(thing.id)
query_string =
On Nov 14, 7:18 pm, John Nagle na...@animats.com wrote:
Leaving out exceptions was a mistake. Exceptions are well understood
now,
and they're far better than the usual ignore errors approach one sees in
lamer
C programs.
I am also surprised about the lack of exceptions. I could infer
On Nov 15, 3:00 am, Terry Reedy tjre...@udel.edu wrote:
It seems to me that generators are already 'channels' that connect the
calling code to the __next__ method, a semi-coroutine based on the body
of the generator function. At present, the next method waits until an
object is requested. Then
In article mailman.137.1257787943.2873.python-l...@python.org,
sstein...@gmail.com sstein...@gmail.com wrote:
On Nov 9, 2009, at 11:54 AM, Jon Clements wrote:
On Nov 9, 4:10 pm, Alf P. Steinbach al...@start.no wrote:
First, because as opposed to ch 1 there is quite a bit of code
here, and
On Nov 14, 6:21 pm, James Harris james.harri...@googlemail.com
wrote:
Is there a simple way to play musical notes in Python? Something like
voice.play(c4)
Uhh, tksnack is pretty easy to use IMO, see this link...
http://www.daniweb.com/code/snippet216655.html
No python does not have access
Vincent Davis wrote:
Out of pure curiosity I would like to compare the efficiency of different
methods of finding primes (need not be consecutive). Let me be clear, given
2min, how many primes can you find, they need not be in order or
consecutive. I have not seen any examples of this. I am
In article e16564d8-6e3e-4973-be9c-1e2c81fce...@h34g2000yqm.googlegroups.com,
Cooch kochkin.dmi...@gmail.com wrote:
I want to implement such specific feature:
I have a server written in Python. I have a client written in C++. I
want to use Python as network protocol between them. I mean: client
Let me add a quote from the FAQ:
Why does Go not have exceptions?
Exceptions are a similar story. A number of designs for exceptions
have been proposed but each adds significant complexity to the
language and run-time. By their very nature, exceptions span functions
and perhaps even goroutines;
In article 877htsskox@benfinney.id.au,
Ben Finney ben+pyt...@benfinney.id.au wrote:
Terry Reedy tjre...@udel.edu writes:
So, the only reason to use c.l.p is if one wants to post anonymously,
like the spammers do ;-).
Or if one has an ISP who provides a Usenet feed, like mine does.
Mine
Thanks !
Okay, i've already used the call of tp_free as the last
statement in tp_dealloc and do understand now, that a
call of tp_dealloc should be the last statement in the
code for tp_free in specific cases.
And yes, Py_Type(Foo_Type) = PyType_Type will be
more stable against changes of the
On Saturday 14 November 2009 18:42:07 Vincent Manis wrote:
3. Very clearly CPython can be improved. I don't take most benchmarks
very seriously, but we know that CPython interprets bytecode, and
thus suffers relative to systems that compile into native code, and
likely to some other
John Nagle wrote:
Steven D'Aprano wrote:
Take a good look at Shed Skin. One guy has been able to build a system
that compiles Python to C++, without requiring the user to add
annotations about types.
In *only* compiles a subset of Python, as does Cython. Both cannot
(currently) do
Hi,
unfortunately is my question about server COM (win32com)
http://groups.google.com/group/comp.lang.python/browse_thread/thread/ee804cec7f58c6a7#
without answer.
Please I need Calling Python functions from Excel and receive result
back in Excel. Can me somebody advise simplest solution please?
John Nagle wrote:
Take a good look at Shed Skin. ...
You give up some flexibility; a variable can have only one primitive type
in its life, or it can be a class object. That's enough to simplify the
type analysis to the point that most types can be nailed down before the
program is run.
Cannonbiker wrote:
Please I need Calling Python functions from Excel and receive result
back in Excel. Can me somebody advise simplest solution please? I am
more VBA programmer than Python.
Maybe this will help:
http://oreilly.com/catalog/pythonwin32/chapter/ch12.html (Scroll down to
Changes by Martin v. Löwis mar...@v.loewis.de:
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7320
___
___
Python-bugs-list
New submission from Damian Eads damian.e...@gmail.com:
The instructions for the C interface to the Python set class
http://docs.python.org/c-api/set.html
say to use PyObject_GetIter and follow the iterator protocol. After
following the instructions for the iterator protocol here,
Trundle andy-pyt...@hammerhartes.de added the comment:
Crashes reliable with a segfault in Python 3.1.1.
Fixing the setter so that one can only set strings and not arbitrary
objects is possibly the best solution.
--
nosy: +Trundle
versions: +Python 3.1
jasper jas...@humppa.nl added the comment:
Removing --with-fpectl makes no difference.
I'll try the _PyHash_Double-thing later this weekend.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7296
Eric Smith e...@trueblade.com added the comment:
I'm not sure why reason should be restricted to a string. This patch
(against trunk) just converts reason to a string when str() is called.
I'll add tests and fix the other places in exceptions.c where similar
shortcuts are taken without checking,
Eric Smith e...@trueblade.com added the comment:
Actually attach the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7309
___
___
Eric Smith e...@trueblade.com added the comment:
One more time with the patch attachment.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7309
___
Changes by Eric Smith e...@trueblade.com:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7309
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith e...@trueblade.com:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7309
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith e...@trueblade.com added the comment:
For some reason I'm not able to attach the patch file. I'll look at
that, but in the meantime here's the preliminary patch against trunk:
Index: Objects/exceptions.c
===
---
Mark Dickinson dicki...@gmail.com added the comment:
It looks like the PyLong version of reverse is broken too:
list(range(10**100, 10**100-2, -2))
[1
]
list(reversed(range(10**100, 10**100-2,
Georg Brandl ge...@python.org added the comment:
If your current directory is (e.g.) /home/user, then ../xyz will not
bring you back to it. (xyz/.. would.)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7315
Ezio Melotti ezio.melo...@gmail.com added the comment:
Note that on Py2.6, when, for example, a string is assigned to u.start
and u.end a TypeError is raised, and the value is then set to -1:
u=UnicodeTranslateError(u'x', 1, 5, 'bah')
u.start = 'foo'
Traceback (most recent call last):
File
Mark Dickinson dicki...@gmail.com added the comment:
I've updated to patch to improve the tests, and fix the problems with the
PyLong version of range.__reversed__. (Also updated on Rietveld.)
--
Added file: http://bugs.python.org/file15329/issue7298_v2.patch
Antoine Pitrou pit...@free.fr added the comment:
Set objects are iterable, they are not iterators themselves.
In other words, PyIter_Check() should return true when called with the
result of PyObject_GetIter() (but normally you don't need to check anyway).
--
nosy: +pitrou
resolution:
Antoine Pitrou pit...@free.fr added the comment:
I've attached an updated patch that fixes the problem, but I'm not sure
it is a correct fix.
Your patch looks fine to me.
--
___
Python tracker rep...@bugs.python.org
Changes by Domen ielect...@gmail.com:
--
nosy: +iElectric
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5672
___
___
Python-bugs-list mailing list
R. David Murray rdmur...@bitdance.com added the comment:
Committed to trunk in r76260 and py3k in r76261.
--
resolution: - accepted
stage: patch review - committed/rejected
status: open - closed
type: behavior - feature request
___
Python tracker
Changes by Senthil Kumaran orsent...@gmail.com:
--
assignee: - orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4683
___
___
Charles Cazabon charlesc-pyt...@pyropus.ca added the comment:
Hi Jesse -- Any chance you'll be able to review this in time for it to
make it into trunk for the 2.7 alpha release?
Charles
--
___
Python tracker rep...@bugs.python.org
Mats Kindahl m...@sun.com added the comment:
So, what is the status on this?
Who needs to review it?
Is there anything I can do to get it accepted?
Do I need to make any changes (in addition to those already suggested
and done by fdrake)?
--
___
New submission from David M. Beazley beaz...@users.sourceforge.net:
Consider a socket that has had a file-like wrapper placed around it
using makefile()
# s is a socket created previously
f = s.makefile()
Now, suppose that this socket has had a timeout placed on it.
s.settimeout(15)
If you
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
I've noticed this depends on the user privileges. When logged in as a
normal user, I get the internal error as originally reported. When
logged in as an administrator, there is no error and I get an empty
string.
--
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar:
--
versions: +Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue
___
___
R. David Murray rdmur...@bitdance.com added the comment:
Failures still occur occasionally even with the timeout set to 60. So
I've turned the check that is skipped on Windows from an assertion into
a warning only on all other platforms, since bsddb support isn't
actively maintained and is gone
New submission from Adam Tomjack a...@zuerchertech.com:
These should all return False, or some of them should raise exceptions:
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
import decimal
Changes by Adam Tomjack a...@zuerchertech.com:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7323
___
___
Python-bugs-list
New submission from R. David Murray rdmur...@bitdance.com:
In forward porting a patch to py3k I noticed that there is a 'g' option
in the optparse argument list in regrtest in 2.x that is not present in
3.x. But the surprising thing was that there are no docs for this
option, nor any option
Jesse Noller jnol...@gmail.com added the comment:
On Sat, Nov 14, 2009 at 11:43 AM, Charles Cazabon
rep...@bugs.python.org wrote:
Charles Cazabon charlesc-pyt...@pyropus.ca added the comment:
Hi Jesse -- Any chance you'll be able to review this in time for it to
make it into trunk for the
Eric Smith e...@trueblade.com added the comment:
The patch that is (hopefully) attached is a first, incomplete cut just
for demonstration purposes. I still need to cover all of the cases where
PyString_AS_STRING are called without type checking. Also, as Ezio
points out, start and end are used
Changes by Eric Smith e...@trueblade.com:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7309
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7323
___
___
Ezio Melotti ezio.melo...@gmail.com added the comment:
The same problem (u.start and u.end) also affects the other UnicodeError
exceptions (namely UnicodeEncodeError and UnicodeDecodeError).
Py2.4 and 2.5 don't seem to segfault with the example I provided.
--
Pawel Prokop pa...@uek.krakow.pl added the comment:
Repack of unittest was good idea. It is a patch against trunk, one test
case is provided and documentation update.
--
Added file: http://bugs.python.org/file15332/unittest_runTime.patch
___
Python
R. David Murray rdmur...@bitdance.com added the comment:
That should have been 'getopt option list'.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7324
___
Brett Cannon br...@python.org added the comment:
I bet it was an option oversight. Since regrtest is an internal tool we
don't really need to fret about backwards-compatibility for anyone.
--
nosy: +brett.cannon
___
Python tracker
New submission from Roy Smith r...@panix.com:
The docs (http://www.python.org/doc/2.5.1/lib/module-tempfile.html) specify
that
mkdtemp(), returns the absolute pathname of the new directory. It does that
in
the default case, but if you specify a relative path for 'dir', you get back a
Changes by Gregory P. Smith g...@krypto.org:
--
assignee: - gregory.p.smith
nosy: +gregory.p.smith
priority: - normal
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7322
___
R. David Murray rdmur...@bitdance.com added the comment:
This is true on trunk and py3k as well. 2.5 is in security fix only
mode, so I've removed it from the versions list.
Since mkstemp does return in the absolute path in this case, I think
this is a code rather than a documentation bug.
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Here's an updated patch.
- Renamed tobytes() to to_bytes() and frombytes() to from_bytes().
- Moved the changes to pickle to a different patch.
- Made the NULL-checks more consistent with the rest of long's code.
- Fixed the type
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar:
Removed file: http://bugs.python.org/file14803/EditorWindow.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6804
___
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
This new patch addresses the previous comments.
--
Added file: http://bugs.python.org/file15334/EditorWindow.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6804
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
This patch may solve this issue, but I don't have a Vista install to
test it.
--
keywords: +patch
Added file: http://bugs.python.org/file15335/FixTk.diff
___
Python tracker
Eric Smith e...@trueblade.com added the comment:
Another patch against trunk which deals with:
UnicodeEncodeError: reason and encoding
UnicodeDecodeError: reason and encoding
UnicodeTranslateError: reason
Still needs tests. Also, the unchecked use of start and end needs to be
addressed. I'm
Changes by Eric Smith e...@trueblade.com:
Removed file: http://bugs.python.org/file15331/issue7309.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7309
___
Mark Dickinson dicki...@gmail.com added the comment:
Unfortunately there's no easy way to fix this in 2.x, where any object is
supposed to be comparable with any other. See issue 2531 for a previous
discussion. It's fixed in 3.x: there a comparison (other than ==, !=)
between a float and a
Changes by Eric Smith e...@trueblade.com:
Added file: http://bugs.python.org/file15337/issue7309-1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7309
___
Changes by Eric Smith e...@trueblade.com:
Removed file: http://bugs.python.org/file15336/issue7309.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7309
___
Mark Dickinson dicki...@gmail.com added the comment:
Just closed issue 7323 as a duplicate of this one.
I think this issue is worth reopening: with the backport of the py3k
correctly rounded string - float conversions, there might now be a
reasonable way to rewrite Decimal.__hash__ so that
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +adamtj
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2531
___
___
Python-bugs-list mailing
Mark Dickinson dicki...@gmail.com added the comment:
I've re-opened issue 2531: some recent changes (in particular, the
backport of the 3.x float - string conversions to 2.x) may make
previously rejected solutions viable again.
--
___
Python
Eric Smith e...@trueblade.com added the comment:
Tests need to cover issues like:
# assigning a non-string to e.object
e = UnicodeDecodeError(, , 0, 1, )
e.object = None
print str(e)
# start and end out of range
e = UnicodeDecodeError(, , 0, 1, )
e.start = 1000
e.end = 1001
print str(e)
For
Patricia Irwin plir...@gmail.com added the comment:
Hi,
I'm running Windows XP Professional and just installed Python 2.6. I
installed it for all users. Tried starting up IDLE and nothing happened.
I read the boards here, and it looks like others have had similar
troubles. I read on this board
R. David Murray rdmur...@bitdance.com added the comment:
Committed in r76276 through r76281, along with removing 'g' from the
getopt list in 2.6. 3.1 still has other traces of the -g option; I
haven't cleaned that up.
--
assignee: - r.david.murray
resolution: - fixed
stage: patch
Tarek Ziadé ziade.ta...@gmail.com added the comment:
Does it have to be a DWORD, or a 0/1 value, or under HKCU for a
specific reason?
This notepad test was just to make sure the registry reader works
by returning a known value.
I can change it using:
Tarek Ziadé ziade.ta...@gmail.com added the comment:
This is a problem indeed.
One solution would be to generate a module in the stdlib that contains
all these info, when configure is called.
as a matter of fact, I am currently working in a branch to add a module
called sysconfig to the
Martin v. Löwis mar...@v.loewis.de added the comment:
Patricia, if you want to report a bug, please don't follow up to an
existing, closed bug report.
If you are just asking for help: delete the folder .idlerc and all of
its files, and retry.
--
___
Tarek Ziadé ziade.ta...@gmail.com added the comment:
see http://mail.python.org/pipermail/python-dev/2009-November/094232.html
(notice that the dependency in install can be removed easily because it
just reads variables from sys and does not require to import sysconfig)
--
Michał Pasternak michal@gmail.com added the comment:
This patch works OK for me (Vista Home Premium + Python 2.6), thanks!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6906
___
New submission from pablo veloz pvelo...@msn.com:
sorry for my english, but how can i reparer that problem? help me pls thank.
--
messages: 95273
nosy: pveloz
severity: normal
status: open
title: SOLUTION pls? /usr/lib/python2.6/dist-packages/visual/__init__.py, line
59, in module
Senthil Kumaran orsent...@gmail.com added the comment:
This issue is Invalid. I am sorry that it had be open for so long
without any explanation.
The order in which the handlers are tried does not depend upon the way
http_error_auth_reqed method is coded, but rather on the handler_order.
In
Nick Coghlan ncogh...@gmail.com added the comment:
Descoped idea to just provide runpy.run_path (filesystem path equivalent
of runpy.run_module)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6816
101 - 190 of 190 matches
Mail list logo