exar...@twistedmatrix.com wrote:
Fore!
print(sum(map(int, input('enter two numbers: ').split(
Well, I _was_ trying to stick to Steven's more simple map-less form :)
(Although I have to say, I have little sympathy for Steven's
hypothetical new programmer who isn't familiar with map and
a...@pythoncraft.com (Aahz) wrote:
If a new-ish term is being introduced,
expecting each person to search for the meaning is rude.
The question then becomes how does one determine whether a term one is
using needs defining? Does OO? How about FP? Or TDD? Is there a metric
for how many years or
a...@pythoncraft.com (Aahz) writes:
In article mailman.1348.1276386991.32709.python-l...@python.org,
geremy condra debat...@gmail.com wrote:
Bug filed, http://bugs.python.org/issue8986.
Please don't put extraneous punctuation on URLs.
The punctuation isn't extraneous; it's a necessary
On Jun 13, 4:07 pm, bolega gnuist...@gmail.com wrote:
I am trying to compare LISP/Scheme/Python for their expressiveness.
For this, I propose a vanilla C interpreter. I have seen a book which
writes C interpreter in C.
The criteria would be the small size and high readability of the code.
On Sun, Jun 13, 2010 at 9:46 AM, exar...@twistedmatrix.com wrote:
On 04:25 pm, wuwe...@gmail.com wrote:
Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
No, I think your code is very simple. You can save a few lines by writing
it like this:
s = input('enter two numbers: ')
t =
On 6/13/10 8:43 PM, alex23 wrote:
a...@pythoncraft.com (Aahz) wrote:
If a new-ish term is being introduced,
expecting each person to search for the meaning is rude.
The question then becomes how does one determine whether a term one is
using needs defining?
When someone asks for the
Excuse me!!
Would you stop for a moment?!
O...man...Haven't you thought-one day- about yourself ?
Who has made it?
Have you seen a design which hasn't a designer ?!
Have you seen a wonderful,delicate work without a worker ?!
It's you and the whole universe!..
Who has made them all ?!!
You know
On Sun, Jun 13, 2010 at 6:44 PM, Ben Finney ben+pyt...@benfinney.id.au wrote:
a...@pythoncraft.com (Aahz) writes:
In article mailman.1348.1276386991.32709.python-l...@python.org,
geremy condra debat...@gmail.com wrote:
Bug filed, http://bugs.python.org/issue8986.
Please don't put
Lord Headley Al-Farooq (England)
Peer, Statesman, and Author
About the Author:
Lord Headley al-Farooq (Rt. Hon. Sir Rowland George Allanson) was born
in 1855 A.D. and was a leading British peer, statesman and author.
Educated in Cambridge, he became a peer in 1877, served in the army as
a
On Sun, 13 Jun 2010 18:43:01 -0700, alex23 wrote:
a...@pythoncraft.com (Aahz) wrote:
If a new-ish term is being introduced, expecting each person to search
for the meaning is rude.
The question then becomes how does one determine whether a term one is
using needs defining? Does OO? How
alex23 wuwe...@gmail.com writes:
(Although I have to say, I have little sympathy for Steven's
hypothetical new programmer who isn't familiar with map and reduce.
With ‘reduce’ gone in Python 3 [0], I can only interpret that as “I have
little sympathy for programmers who start with Python 3”.
On Sun, 13 Jun 2010 19:05:28 -0700, geremy condra wrote:
On Sun, Jun 13, 2010 at 6:44 PM, Ben Finney ben+pyt...@benfinney.id.au
wrote:
a...@pythoncraft.com (Aahz) writes:
In article mailman.1348.1276386991.32709.python-l...@python.org,
geremy condra debat...@gmail.com wrote:
Bug filed,
geremy condra debat...@gmail.com writes:
You know, I've never been a part of a community in which the URL
format was the most contentious part of filing a bug report.
Heck no, the bug report is already filed, and contentions about the bug
report should presumably be going into that report.
On Sun, 13 Jun 2010 18:35:52 -0700, alex23 wrote:
I have little sympathy for Steven's
hypothetical new programmer who isn't familiar with map and reduce.
Perhaps you need to spend some more time helping beginners then, and less
time hanging around Lisp gurus *wink*
Python isn't PHP, its
Probably doesn't meet your intent, but this is a really impressive bit
of (whacky) art:
Lisp runs faster than C. Once you get more time away from screwing
Palestinians, and other false-flags, you will find ideas like these
How to make Lisp go faster than C
Didier Verna
Abstract
Contrary to
rbenit68 rbeni...@gmail.com wrote:
I would like to run this minimal example: I get the prompt
(Question?), but not the 'default editable signal'. Please ¿any hints?
(Windows XP-SP3, Python 2.6, pyreadline 1.5)
PyReadline on Windows is not identical to readline on Linux, in part
because the
I'd like to use the BSDDB module in an app (intended only for GNU/
Linux like OSes).
I don't need the on-disk file to hang around after I've used it. So as
per the docs I gave it None for the filename.
The problem is, it creates the temporary file in /var/tmp. If the user
uses separate root and
On Sun, Jun 13, 2010 at 11:01 PM, Jason jason.hee...@gmail.com wrote:
I'd like to use the BSDDB module in an app (intended only for GNU/
Linux like OSes).
I don't need the on-disk file to hang around after I've used it. So as
per the docs I gave it None for the filename.
The problem is, it
On 6/13/2010 9:43 PM, alex23 wrote:
a...@pythoncraft.com (Aahz) wrote:
If a new-ish term is being introduced,
expecting each person to search for the meaning is rude.
The question then becomes how does one determine whether a term one is
using needs defining?
If it has never be used before
i have a doubt about ...this..can u look into this..
a = open(human.odt,r)
b = a.readlines()
print b
and i get d output something else...
python monday.py
Well, AFAIK Nokia N900 supports python fully.
On Mon, Jun 14, 2010 at 4:08 AM, Anthony Papillion papill...@gmail.comwrote:
Thank you gentleman for your input. I'm starting to look at Python/GTK
for desktop development and was hoping there might also be something
for Android. Oh well, like
Nick Coghlan ncogh...@gmail.com added the comment:
Reverted in r81964, marking as 3.2 only.
For 3.2, I'll get rid of the hack by having SetArgV treat both -c and -m as
special values for sys.argv[0], and by adding some unit tests that make sure
the presence of files with those names has no
Sworddragon sworddrag...@aol.com added the comment:
This registry key contains E:\Python31\python.exe %1 %*. I have too 2
python versions installed and manually associated the .py files to Python 3.
--
___
Python tracker rep...@bugs.python.org
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +mark.dickinson
stage: - unit test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8986
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8887
___
___
Python-bugs-list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8957
___
___
Python-bugs-list
Ezio Melotti ezio.melo...@gmail.com added the comment:
Can you provide a patch?
--
nosy: +ezio.melotti
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8940
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti, flox
stage: - needs patch
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8911
___
Changes by Mark Dickinson dicki...@gmail.com:
--
assignee: - mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8986
___
___
Mark Dickinson dicki...@gmail.com added the comment:
Thanks for the report. What platform are you on? I'm not seeing this
behaviour on OS X:
Python 3.2a0 (py3k:81935M, Jun 12 2010, 10:01:38)
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type help, copyright, credits or license for more
Changes by Mark Dickinson dicki...@gmail.com:
--
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8986
___
___
Python-bugs-list
Mark Dickinson dicki...@gmail.com added the comment:
Geremy, can you verify that the attached patch fixes the problem? If so, I'll
add tests and commit.
--
keywords: +patch
Added file: http://bugs.python.org/file17654/issue8986.patch
___
Python
geremy condra debat...@gmail.com added the comment:
On Sun, Jun 13, 2010 at 5:47 AM, Mark Dickinson rep...@bugs.python.org wrote:
Mark Dickinson dicki...@gmail.com added the comment:
Geremy, can you verify that the attached patch fixes the problem? If so,
I'll add tests and commit.
I've
New submission from gonegown nomedo...@gmail.com:
I have python 3.1.2 fetched from the main site.
imagine two source files:
a.py:
---
# coding: cp1251
import b;
print('A');
---
b.py:
---
print('B');
---
Both reside in the same directory containing at least one non-ascii
Mark Dickinson dicki...@gmail.com added the comment:
Fixed in r81967 (trunk) and r81968 (py3k).
I had to weaken the tests for erfc: its accuracy for largish arguments (25.0
or so) is not ideal---I was seeing errors of 100 ulps and more. However, I
think this level of error is acceptable in
Mark Dickinson dicki...@gmail.com added the comment:
The latest patch looks good to me. I only have minor comments, in random order:
- Should the PyDateTime_TimeZone struct definition go into datetime.h, so that
it's avaiable if you want to export any C-API functions later on?
- If you're
New submission from Adrian von Bidder avbid...@fortytwo.ch:
Using the hostname for the domain part of a Message-Id is probably the right
thing usually but users may want to override this.
Please consider this rather trivial patch:
=
--- utils.py.orig 2010-06-13 16:59:30.533861099
Éric Araujo mer...@netwok.org added the comment:
Seems straightforward. Any reason not to allow it David?
Adrian, I edited the versions: new features go into 3.2 only. Please make sure
your patch applies to this version (branch named py3k). Can you also write unit
tests for this new
Shashwat Anand anand.shash...@gmail.com added the comment:
Adrian, Could you generate the diffs from the
top level of the checkout and attach it here?
--
nosy: +l0nwlf
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8989
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
On Sun, Jun 13, 2010 at 10:09 AM, Mark Dickinson rep...@bugs.python.org wrote:
..
- Should the PyDateTime_TimeZone struct definition go into
datetime.h, so that it's avaiable if you want to export any C-API
functions
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Just to add a little bit of historical perspective, this proposal is really
more than seven years old:
s.keim (Dec 20, 2002 3:33 am; Comment #13)
.. do we really need methods like utcnow. I believe the following could
Germán L. Osella Massa gose...@gmail.com added the comment:
I now see the rationale behind not accepting ' 10 ' == 10. But what about not
accepting '-1' == -1?
I think is odd that negative numbers are not accepted as valid indexes. I'd
expect that something like
First element is {0[0]} and
Shashwat Anand anand.shash...@gmail.com added the comment:
Agreed.
Attaching the unit test.
--
Added file: http://bugs.python.org/file17656/test_httpserver.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7370
Éric Araujo mer...@netwok.org added the comment:
The skeleton is good but you have to change one thing. Your test should
exercise a function or method of BaseHTTPServer, not the underlying
implementation detail. I failed to explain that earlier:
1a) Write a test that checks that the current
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
issue5094g.diff addresses all Mark's suggestions except making struct
definition public. I also made a few other changes:
1. Constructor now raises TypeError when offset is not a timedelta instead of
ValueError in
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Also I changed Py_DECREFs in destructor to Py_CLEAR. I understand that while
not strictly required in this case, it is a good practice.
--
___
Python tracker
New submission from Thomas Jollans tho...@jollans.com:
Currently, the array constructor, if given a bytearray, detects this with
PyByteArray_Check, and hands it on to array_fromstring, which does not support
bytearray (by using s# with PyArg_ParseTuple) and raises TypeError.
array('h',
David Watson bai...@users.sourceforge.net added the comment:
New version with minor changes. Will also upload at
http://codereview.appspot.com/1487041/show
--
Added file: http://bugs.python.org/file17659/baikie-hwundram-v4.diff
___
Python tracker
Changes by Eric Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8972
___
___
Python-bugs-list mailing
David Watson bai...@users.sourceforge.net added the comment:
Optional patch to replace SocketTCPTest, etc. with the classes from the sendmsg
patch.
--
Added file: http://bugs.python.org/file17660/v4-replace-existing-classes.diff
___
Python tracker
STINNER Victor victor.stin...@haypocalc.com added the comment:
I commited a bigger patch: r81973 not only fixes y format, but also u and
Z. It does also add a lot of tests in test_getargs2.py for many string
formats (not all, eg. es is not tested).
Even if I consider this as a bugfix, I don't
STINNER Victor victor.stin...@haypocalc.com added the comment:
Update the patch to update also the new tests that I added in r81973 (to fix
#8592).
--
Added file: http://bugs.python.org/file17661/pyarg_z_no_bytes-2.patch
___
Python tracker
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file17591/pyarg_z_no_bytes.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8949
___
New submission from STINNER Victor victor.stin...@haypocalc.com:
getbuffer() checks that the buffer is contiguous. s#, y, z formats use
convertbuffer() which doesn't check that the buffer is contigious, as w and
w# formats which call directly PyObject_GetBuffer() which extra check.
I don't
STINNER Victor victor.stin...@haypocalc.com added the comment:
r81811 and r81923 improve Doc/c-api/arg.rst. I opened more specific issues to
improve getargs code and documentation:
- #8991: PyArg_Parse*() functions: reject discontinious buffers
- #8926: getargs.c: release the buffer on error
shypike shyp...@sabnzbd.org added the comment:
The discussion is going the wrong way. Let me state what is the actual problem.
When the Popen() function is called with shell=True, you cannot pass command
line elements in which the characters '' and '|' are embedded (example
r'QA').
New submission from STINNER Victor victor.stin...@haypocalc.com:
If convertitem() result is not NULL, an error occured and seterror() is called
(by the function calling convertitem()). seterror() does nothing if an
exception was raised (if PyErr_Occurred() is non zero).
convertitem() doesn't
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8969
___
Éric Araujo mer...@netwok.org added the comment:
Here’s a quick crack at it. Conservative approach: Don’t reindent, just
complain.
--
keywords: +patch
nosy: +merwok
stage: - patch review
versions: +Python 2.7, Python 3.2
Added file: http://bugs.python.org/file17663/check-tabs.diff
STINNER Victor victor.stin...@haypocalc.com added the comment:
w# is not only useless but also not used in py3k source code. w is also not
used. Only w* is used by fnctl and socket modules.
The problem with w# is that the caller cannot release the buffer and so we
cannot lock the buffer. I
Éric Araujo mer...@netwok.org added the comment:
I’d remove the lines “Specifically it does not define the :meth:`__enter__` and
:meth:`__exit__` methods required by the :keyword:`with` statement”, since they
add unnecessary length to a simple note.
Please provide one patch per branch, and
Éric Araujo mer...@netwok.org added the comment:
Also, don’t bother with 3.0: It is not supported by python-dev anymore. Make
documentation patches for py3k and trunk, and they’ll be backported to the
stable branches 3.1 and 2.6.
--
___
Python
Éric Araujo mer...@netwok.org added the comment:
I think you can go ahead and produce a patch. Don’t start splitting argparse
into a package now though, this is a sensible decision IMO but has to be agreed
by the maintainer; just add FlagAction and ConfigureAction to argparse for now.
Éric Araujo mer...@netwok.org added the comment:
Patch looks good to me. Could you add some tests to Lib/test/test_functools.py
to check that annotations are really copied?
(3.2 is not frozen, adjusting versions)
--
stage: - unit test needed
versions: -Python 3.3
Éric Araujo mer...@netwok.org added the comment:
Dave, can you explain your problem with a quote or a file name and line number,
or directly propose a doc patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8653
Éric Araujo mer...@netwok.org added the comment:
haypo, I was not speaking about documenting the buffer protocol in general, but
reacting to this specific change in your patch/commit:
- buffer protocol (such as :class:`bytes` or :class:`bytearray` objects).
+ buffer protocol.
Before the
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8912
___
___
Python-bugs-list mailing
Éric Araujo mer...@netwok.org added the comment:
Updating patch to check header files too. Untested.
--
Added file: http://bugs.python.org/file17664/check-tabs.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8912
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:
The following command (in bash shell) shows more files:
find -name '*.[ch]' -exec grep -El $'^\t' {} \;
I think that internal copies of libffi should be ignored.
--
nosy: +Arfrever
Sindre Myren smyr...@gmail.com added the comment:
I have to agree with jab. While the way relative paths works are more or less
common knowledge, the way umask does and does not work in relation to python
isn't.
It is however given a short description at
Changes by Eric Smith e...@trueblade.com:
--
versions: -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7951
___
___
Python-bugs-list
Eric Smith e...@trueblade.com added the comment:
I'll consider this a duplicate. Issue 7951 is the existing feature request for
this issue. I'll merge the nosy lists.
--
resolution: rejected - duplicate
superseder: - Should str.format allow negative indexes when used for
__getitem__
Eric Smith e...@trueblade.com added the comment:
Closed issue 8985 as a duplicate of this; merging nosy lists.
--
nosy: +gosella, mark.dickinson, merwok
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7951
Changes by Eric Smith e...@trueblade.com:
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7951
___
___
Python-bugs-list
R. David Murray rdmur...@bitdance.com added the comment:
This does seem like a reasonable (and backward compatible) addition to the API.
I'm only +0 on adding it, though, without at least one specific use case. I'd
want to mention that use case in the docs as an example, and stress that
Changes by R. David Murray rdmur...@bitdance.com:
--
assignee: - r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8989
___
___
Jean-Paul Calderone exar...@twistedmatrix.com added the comment:
That remark is not relevant, because the actual problem is different.
Maybe you can expand the test case to demonstrate the actual problem? The
tests in the latest patch are for list2cmdline directly. But you can't observe
R. David Murray rdmur...@bitdance.com added the comment:
The actual bug here is that list2cmdline is called when shell=True and a list
is passed. This should not be done. Instead, Popen should raise an TypeError
(see issue 7839).
When calling Popen with shell=True, you should be passing in
R. David Murray rdmur...@bitdance.com added the comment:
See issue 8972 for motivation for accepting this proposal. Maybe I should
start working on the patch :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7839
New submission from flashk fla...@gmail.com:
The docs for PySys_SetArgv say:
This function works like PySys_SetArgv() with updatepath set to 1.
I believe it should be PySys_SetArgvEx.
I've attached a patch.
--
assignee: d...@python
components: Documentation
files: init.rst.patch
R. David Murray rdmur...@bitdance.com added the comment:
Note that list2cmdline does correct quoting (which includes the s) if you are
passing the string directly to a program. In that case cmd.exe's
metacharacters aren't special. (As I noted in issue 8972, I believe that
list2cmdline's
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8988
___
___
Python-bugs-list
Changes by R. David Murray rdmur...@bitdance.com:
--
components: +Interpreter Core -None
stage: - unit test needed
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8988
R. David Murray rdmur...@bitdance.com added the comment:
I don't understand what you mean when you say how umask works in relation to
Python. How it works in relation to Python isn't different from how it works
for any other Unix program. Consider, for example, the unix man page for
'open'.
101 - 184 of 184 matches
Mail list logo