On Apr 22, 8:18 am, MRAB pyt...@mrabarnett.plus.com wrote:
On 22/04/2011 15:57, Irmen de Jong wrote:
On 22-4-2011 15:55, Vlastimil Brom wrote:
Hi all,
I'd like to ask for comments or advice on a simple code for testing a
subdict, i.e. check whether all items of a given dictionary
Irmen de Jong irmen.nos...@xs4all.nl writes:
I would use:
test_dct.items() = base_dct.items()
I think you need an explicit cast:
set(test_dct.items()) = set(base_dct.items())
--
http://mail.python.org/mailman/listinfo/python-list
Is PEP necessary to add a new package to the standard library?
What if the community just wants to add a new module to an existing package?
What if only a new function has to be added to a module in the standard library?
What if only a line or two are to be added to a function in the
standard
On Saturday 23 April 2011 14:13:31 sturlamolden wrote:
On Apr 23, 2:32 am, Algis Kabaila akaba...@pcug.org.au
wrote:
Thanks for that. Last time I looked at numpy (for Python3)
it was available in source only. I know, real men do
compile, but I am an old man... I will compile if it is
On Apr 23, 4:28 pm, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Fri, 22 Apr 2011 17:08:53 +1000, Chris Angelico ros...@gmail.com
declaimed the following in gmane.comp.python.general:
I'm not so sure that all strings should autopromote to integer (or
numeric generally). However, adding
On Sat, 23 Apr 2011 17:46:26 +0530, Disc Magnet wrote:
Is PEP necessary to add a new package to the standard library?
See http://www.python.org/dev/peps/pep-0001/
What if the community just wants to add a new module to an existing
package?
Just? Adding a new module is a big step.
How do
On Wed, Apr 20, 2011 at 20:15, Ron ron.rei...@gmail.com wrote:
Hey everyone.
I've written an online interactive Python tutorial atop Google App Engine:
http://www.learnpython.org.
All you need to do is log in using your Google account and edit the wiki to
add your tutorials.
Read more
On Apr 23, 2:26 pm, Algis Kabaila akaba...@pcug.org.au wrote:
I do understand that many people prefer Win32 and
appreciate their right to use what they want. I just am at a
loss to understand *why* ...
For the same reason some people prefered OS/2 or
DEC to SunOS or BSD.
For the same reason
On Apr 23, 1:28 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
But what if /I/ want
A + 1
to return
B
No problem! Python even allows you to create your own functions! I
know, amazing! 8-O
def succ(s):
return chr(ord(s) + 1)
succ('a')
'b'
On Apr 22, 1:38 am, harrismh777 harrismh...@charter.net wrote:
Strings should auto-type-promote to numbers if appropriate.
No they should not! We do not want a language to guess our
intentions. We are big boys and girls and should be responsible for
own actions.
This behavior should occur in
On Fri, Apr 22, 2011 at 09:38, harrismh777 harrismh...@charter.net wrote:
If an operation like (+) is used to add 1 + '1' then the string should be
converted to int and the addition should take place, returning a reference
to object int (2).
No, the int 1 should be cast to a string, and the
On 04/23/2011 11:51 AM, Dotan Cohen wrote:
harrismh777harrismh...@charter.net wrote:
If an operation like (+) is used to add 1 + '1' then the
string should be converted to int and the addition should
take place, returning a reference to object int (2).
No, the int 1 should be cast to a
Hello guys,
I need to detect the newline characters used in the file I am reading.
For this purpose I am using the following code:
def _read_lines(self):
with contextlib.closing(codecs.open(self.path, rU)) as fobj:
fobj.readlines()
if isinstance(fobj.newlines, tuple):
On Sat, Apr 23, 2011 at 11:09 AM, Daniel Geržo dan...@rulez.sk wrote:
Hello guys,
I need to detect the newline characters used in the file I am reading. For
this purpose I am using the following code:
def _read_lines(self):
with contextlib.closing(codecs.open(self.path, rU)) as fobj:
Daniel Geržo wrote:
I need to detect the newline characters used in the file I am reading.
For this purpose I am using the following code:
def _read_lines(self):
with contextlib.closing(codecs.open(self.path, rU)) as fobj:
fobj.readlines()
if
On Fri, Apr 22, 2011 at 10:08:20AM -0400, Mel wrote:
Westley Martínez wrote:
On Fri, Apr 22, 2011 at 04:49:19PM +1000, Chris Angelico wrote:
U NO. NO NO NO. What if someone enters os.exit() as their
number? You shouldn't eval() unchecked user input!
Chris Angelico
Right,
Chris Rebert wrote:
On Sat, Apr 23, 2011 at 11:09 AM, Daniel Geržo dan...@rulez.sk wrote:
I need to detect the newline characters used in the file I am reading.
For this purpose I am using the following code:
def _read_lines(self):
with contextlib.closing(codecs.open(self.path, rU)) as
On Fri, Apr 22, 2011 at 04:48:39PM -0700, Dan Stromberg wrote:
On Thu, Apr 21, 2011 at 11:38 PM, harrismh777 harrismh...@charter.netwrote:
Yes. And you have managed to point out a serious flaw in the overall logic
and consistency of Python, IMHO.
Strings should auto-type-promote to
On 23.4.2011 21:33, Thomas 'PointedEars' Lahn wrote:
Chris Rebert wrote:
On Sat, Apr 23, 2011 at 11:09 AM, Daniel Geržodan...@rulez.sk wrote:
I need to detect the newline characters used in the file I am reading.
For this purpose I am using the following code:
def _read_lines(self):
On Apr 22, 12:47 pm, Carl Banks pavlovevide...@gmail.com wrote:
On Thursday, April 21, 2011 11:00:08 AM UTC-7, MRAB wrote:
On 21/04/2011 18:12, Pascal J. Bourguignon wrote:
chadcda...@gmail.com writes:
Let's say I have the following
class BaseHandler:
def foo(self):
Am 23.04.2011 14:16, schrieb Disc Magnet:
Is PEP necessary to add a new package to the standard library?
A PEP is necessary if the proposed change is contentious. If there is
widespread agreement that the change is desirable, no PEP is needed.
What if the community just wants to add a new
On Sat, Apr 23, 2011 at 11:16 PM, Disc Magnet discmag...@gmail.com wrote:
Is PEP necessary to add a new package to the standard library?
*skip*
Don't forget that Python is not limited to CPython. Other
implementations need these PEPs to provide compliant packages.
While its not that important
Daniel Geržo wrote:
Thomas 'PointedEars' Lahn wrote:
Chris Rebert wrote:
Daniel Geržo wrote:
[f.newlines is None after f.readlines()
when f = codecs.open(…, mode='rU', encoding='ascii'),
but not when f = codecs.open(…, mode='rU')]
[…]
I would speculate that the upshot of this is that
On Sat, 23 Apr 2011 13:30:02 -0700, chad wrote:
On Apr 22, 12:47 pm, Carl Banks pavlovevide...@gmail.com wrote:
On Thursday, April 21, 2011 11:00:08 AM UTC-7, MRAB wrote:
On 21/04/2011 18:12, Pascal J. Bourguignon wrote:
chadcda...@gmail.com writes:
Let's say I have the following
Chris Angelico wrote:
Wow, someone else who knows REXX and OS/2! REXX was the first bignum
language I met, and it was really cool after working in BASIC and
80x86 assembly to suddenly be able to work with arbitrary-precision
numbers!
Yes, my big num research stuff was initially done in REXX,
On Fri, 22 Apr 2011 01:38:21 -0500, harrismh777 wrote:
Heiko Wundram wrote:
The difference between strong typing and weak typing is best described
by:
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01) [GCC 4.3.4 20090804
(release) 1] on cygwin Type help, copyright, credits or license
for
Chris Rebert wrote:
Well, it pretty much*was* totally removed; it was prone to misuse and
had very few legitimate uses. It's just that raw_input() also got
renamed simultaneously.
What were you using it for? There are often much better alternatives.
For the purpose pretty much described in
On Apr 23, 5:09 pm, Daniel Kluev dan.kl...@gmail.com wrote:
On Sat, Apr 23, 2011 at 11:16 PM, Disc Magnet discmag...@gmail.com wrote:
Is PEP necessary to add a new package to the standard library?
*skip*
Don't forget that Python is not limited to CPython. Other
implementations need these
On Sun, Apr 24, 2011 at 10:42 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
This is much like my experience with Apple's Hypertalk, where the only
data structure is a string. I'm very fond of Hypertalk, but it is hardly
designed with machine efficiency in mind. If you think
On 23Apr2011 19:37, harrismh777 harrismh...@charter.net wrote:
[...]
| Yes, my big num research stuff was initially done in REXX, on
| VM/CMS. I later ported my libraries over to OS/2 and continued with
| that well into the '90s, when I discovered Unix and 'bc'. Many
| folks are not aware that
Cameron Simpson wrote:
| folks are not aware that 'bc' also has arbitrary precision floating
| point math and a standard math library.
Floating point math? I thought, historically at least, that bc is built
on dc (arbitrary precision integer math, reverse polish syntax) and that
consequently bc
Steven D'Aprano wrote:
If that's a serious flaw, it's a flaw shared by the vast majority of
programming languages.
Yes, agreed.
As for the question of consistency, I would argue the opposite: that
auto-promoting strings to numbers arguably is useful, but that is what is
inconsistent, not
Am 23.04.2011 04:15, schrieb Terry Reedy:
.close() methods that release operating system resources are needed
*because* there is no guarantee of immediate garbage collection. They
were not needed when CPython was the only Python. The with statement was
added partly to make it easier to make
Hi, all,
I have checked out source code from this url
http://svn.python.org/projects/python/branches/py3k, then run
./configure --with-universal-archs=64-bit
make
First of all, I got this message:
---
Modules/Setup.dist is newer than Modules/Setup;
Prashant Kumar contactprashan...@gmail.com added the comment:
Certainly, a test is needed to check that ('config', ['cfg/data.cfg']) would
create a file in config/data.cfg and not config/cfg/data.cfg.
Though, I've added a patch 'test_command_sdist.diff' for the changes made in
'patch.diff'.
New submission from anatoly techtonik techto...@gmail.com:
I want to be able to jump from latest Python 2 docs to the same page in stable
Python 3 doc in one click. E.g. from http://docs.python.org/library/string.html
to http://docs.python.org/py3k/library/strings.html
--
assignee:
anatoly techtonik techto...@gmail.com added the comment:
sorry, to http://docs.python.org/py3k/library/string.html
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11911
___
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
assignee: - vinay.sajip
nosy: +vinay.sajip
versions: +Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11907
___
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
The entire part of emit() which sends to the socket is wrapped in an except:
which should catch all except KeyboardInterrupt and SystemExit. The except
clause calls the handleError method of the handler. See
Michael Gold mg...@ncf.ca added the comment:
No, I don't have a working implementation. (I basically reimplemented
TarFile.inodes to work around this; I was using TarFile.dereference, so I
already had to do the hard-linking manually.)
--
nosy: +mgold
Ezio Melotti ezio.melo...@gmail.com added the comment:
This is a duplicated of #8040.
--
nosy: +ezio.melotti
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - It would be nice if documentation pages linked to other
versions of the same document
Michael Gold mg...@ncf.ca added the comment:
The tests passed on Linux (with Python 3.2 under fakeroot):
Ran 240 tests in 9.613s
OK
But I don't see any tests that check the uid/gid of extracted files.
--
nosy: +mgold
___
Python tracker
Éric Araujo mer...@netwok.org added the comment:
+1 to what David says.
Terry’s patch is a good starting point; I think Raymond will commit something
along its lines.
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
Confirmed. It’s a Debian-specific problem, please use “reportbug python3.2” to
report it to them.
--
nosy: +doko
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Python
Roundup Robot devnull@devnull added the comment:
New changeset eb7297fd5840 by Antoine Pitrou in branch 'default':
Issue #11382: Trivial system calls, such as dup() or pipe(), needn't
http://hg.python.org/cpython/rev/eb7297fd5840
--
nosy: +python-dev
Antoine Pitrou pit...@free.fr added the comment:
Sorry for the delay, I had forgotten about this issue. Thank you for the patch!
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
Can someone remove obsolete files from the file list and post an up-to-date
patch?
--
keywords: -easy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue444582
Changes by Éric Araujo mer...@netwok.org:
--
superseder: - Windows installer should add Python and Scripts directories to
the PATH environment variable
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue482531
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
versions: +Python 3.3 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9325
___
Changes by Éric Araujo mer...@netwok.org:
--
stage: - needs patch
title: locale.normalize strips - from UTF-8, which fails on Mac -
locale.normalize strips - from UTF-8, which fails on Mac
versions: +Python 3.3 -Python 2.5, Python 2.6
___
Python
Éric Araujo mer...@netwok.org added the comment:
This is rejected every few months by Martin.
--
nosy: +eric.araujo
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - Windows installer should add Python and Scripts directories to
the PATH
Éric Araujo mer...@netwok.org added the comment:
Okay. It’s not a very beautiful check, but it will do. Do you want to make a
patch to disable compress if it’s a fake compress program?
--
___
Python tracker rep...@bugs.python.org
Roundup Robot devnull@devnull added the comment:
New changeset 19d9f0a177de by Antoine Pitrou in branch 'default':
Issue #11258: Speed up ctypes.util.find_library() under Linux by a factor
http://hg.python.org/cpython/rev/19d9f0a177de
--
nosy: +python-dev
Antoine Pitrou pit...@free.fr added the comment:
I committed a modified patch. Hopefully the buildbots won't break this time :)
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - pending
___
Python tracker
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
I've got it from here. Thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11889
___
Lukáš Lalinský lalin...@gmail.com added the comment:
It seems that I was wrong, the exception is indeed not propagated to the
application, but handled by the handleError() method. I was confused by seeing
the traceback in my uWSGI log file.
I'm unable to find a way to determine the maximum
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
I've managed to get access to a FreeBSD system and done some investigation. The
system is working as designed, and the error message is being printed by the
handleError() method of the handler. To handle the exception differently, you
New submission from Nils Breunese n...@breun.nl:
When I try to run iotop [0] on CentOS 5.6 on a kernel with grsecurity [1] then
iotop won't start because grsecurity is blocking Python because of its use of
the mprotect() system call.
Please see
Antoine Pitrou pit...@free.fr added the comment:
Where have you seen that Python is calling mprotect()? There's no sign of it in
the whole source tree.
--
nosy: +neologix, pitrou
___
Python tracker rep...@bugs.python.org
Nils Breunese n...@breun.nl added the comment:
I got this error message in /var/log/messages when trying to start iotop:
Apr 13 08:49:37 hostname kernel: grsec: From xxx.xxx.xxx.xxx: denied RWX
mprotect of /lib64/ld-2.5.so by /usr/bin/iotop[iotop:9836] uid/euid:0/0
gid/egid:0/0, parent
Antoine Pitrou pit...@free.fr added the comment:
/usr/bin/iotop is a Python script and according to that log message
grsecurity detected a call to mprotect().
Well, does Python itself run ok? That Python script could use
third-party extension modules which issue the offending mprotect() call.
Nils Breunese n...@breun.nl added the comment:
I haven't had any problems with other Python applications like this, Python
seems fine otherwise.
I just noticed that iotop has a dependency on python-ctypes, which sounds like
it could be iotop doing the mprotect() calls via ctypes. Does that
Rafael Zanella rafael.zane...@yahoo.com.br added the comment:
The patch that makes addinfourl() iterable was not commited due to the change
to HTTP request see: msg86365 (http://bugs.python.org/issue4608#msg86365).
Since urllib is protocol agnostic it should behave the same with FTP, right?
Andreas Stührk andy-pyt...@hammerhartes.de added the comment:
glibc's `dlopen()` can call `mprotect()`, which is used for loading C
extensions.
--
nosy: +Trundle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11912
Ezio Melotti ezio.melo...@gmail.com added the comment:
Attached an updated patch for 2.7 with tests that check that UnicodeErrors are
still raised and that the error message mentions 'str', 'unicode' and 'tuple'.
--
Added file: http://bugs.python.org/file21762/issue6780-2.diff
New submission from Ingy dot Net i...@ingy.net:
When I upload modules to PyPI, distutils is clucking about a missing README,
even though PyPI accepts README.rst, and I am providing that.
Registering pyplay to http://pypi.python.org/pypi
Server response (200): OK
python setup.py sdist upload
New submission from Ben Okopnik b...@okopnik.com:
Long-standing problem (happens in every Python version I've tested). The usual
situation is when invoking Python (and then help('modules')) or pydoc
modules in /tmp, but also happens when located anywhere with unreadable
subdirs:
Changes by Alex Gaynor alex.gay...@gmail.com:
--
nosy: +alex
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9269
___
___
Python-bugs-list mailing
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
I'll write a LocalSysLogHandler for me that uses the syslog module.
Sure, but bear in mind that on some Linux systems at least, the syslog module
has thread safety issues because the underlying C APIs are not thread-safe.
(I'm
not sure
69 matches
Mail list logo