Re: Functions vs OOP

2011-09-04 Thread tinnews
Ian Kelly ian.g.ke...@gmail.com wrote: On Sat, Sep 3, 2011 at 10:15 AM, William Gill noreply@domain.invalid wrote: During some recent research, and re-familiarization with Python, I came across documentation that suggests that programming using functions, and programming using objects were

Re: Installing WebDAV server

2011-09-04 Thread Fokke Nauta
Thomas 'PointedEars' Lahn pointede...@web.de wrote in message news:109595831.vcn276c...@pointedears.de... cut If you don't have anything better to contribute, please stop answering. Es genügt schon. Fokke -- http://mail.python.org/mailman/listinfo/python-list

Re: Functions vs OOP

2011-09-04 Thread Adam Jorgensen
Progranming with functions vs Progranming with objects sounds like C vs. C++ more than functional programming vs. OO programming On 4 September 2011 04:18, William Gill noreply@domain.invalid wrote: On 9/3/2011 9:51 PM, Terry Reedy wrote: It is possible that our doc was less than crystal

Re: [Python-ideas] allow line break at operators

2011-09-04 Thread Yingjie Lan
Thanks, I think that's the rule described in its full glory. Currently I am not  quite sure of the use case for continuation nested in continuation -- it seems to be still a single continuation, but it allows for some additional freedom in formatting the continued line. Do you have other use

Re: Need advice on Web / Database framework...

2011-09-04 Thread Alexandru Lazar
How does web2py compare to django? I just started playing with django, but don't know web2py I haven't used Django, but I did use web2py for a project that fell on my head just before leaving my old workplace. I just wanted it to end quickly so I took web2py as a shortcut. It's a great

Re: Functions vs OOP

2011-09-04 Thread Steven D'Aprano
tinn...@isbd.co.uk wrote: I think there may be another issue here. If someone says functional programming to me then I would generally assume that they *do* mean programming using functions. Strictly speaking you are correct, functional programming does mean programming using functions,

Re: Functions vs OOP

2011-09-04 Thread rusi
On Sep 3, 9:15 pm, William Gill nore...@domain.invalid wrote: During some recent research, and re-familiarization with Python, I came across documentation that suggests that programming using functions, and programming using objects were somehow opposing techniques. Staying with (for the

Can't use subprocess.Popen() after os.chroot() - why?

2011-09-04 Thread Erik
Hi All, I'm trying to do the following: import os from subprocess import Popen, PIPE os.chroot(/tmp/my_chroot) p = Popen(/bin/date, stdin=PIPE, stdout=PIPE, stderr=PIPE) stdout_val, stderr_val = p.communicate() print stdout_val but the Popen call is dying with the following exception:

Re: Can't use subprocess.Popen() after os.chroot() - why?

2011-09-04 Thread Alain Ketterlin
Erik erik.william...@gmail.com writes: import os from subprocess import Popen, PIPE os.chroot(/tmp/my_chroot) p = Popen(/bin/date, stdin=PIPE, stdout=PIPE, stderr=PIPE) stdout_val, stderr_val = p.communicate() print stdout_val but the Popen call is dying with the following exception:

Re: allow line break at operators

2011-09-04 Thread rantingrick
On Sep 3, 11:50 am, Stephen Hansen me+list/pyt...@ixokai.io wrote: Freedom is not and never has been, IMHO, a virtue or goal or even desire in Python. Exactly! Where it occurs, it is at best a happy coincidence, Exactly! and even if that happy coincidence happens often, it is not a

Re: [Python-ideas] allow line break at operators

2011-09-04 Thread ron3200
On Sat, 2011-09-03 at 13:38 +0900, Stephen J. Turnbull wrote: Guido van Rossum writes: On Fri, Sep 2, 2011 at 12:28 AM, Stephen J. Turnbull step...@xemacs.org wrote: Sure, but IIRC one design principle of Python is that the keyword that denotes the syntax should be the first thing

Re: Can't use subprocess.Popen() after os.chroot() - why?

2011-09-04 Thread Hans Mulder
On 4/09/11 17:25:48, Alain Ketterlin wrote: Erikerik.william...@gmail.com writes: import os from subprocess import Popen, PIPE os.chroot(/tmp/my_chroot) p = Popen(/bin/date, stdin=PIPE, stdout=PIPE, stderr=PIPE) stdout_val, stderr_val = p.communicate() print stdout_val but the Popen call is

Re: Functions vs OOP

2011-09-04 Thread Terry Reedy
On 9/4/2011 4:13 AM, tinn...@isbd.co.uk wrote: Ian Kellyian.g.ke...@gmail.com wrote: Functional programming is about using functions in the *mathematical* sense. A mathematical function maps one value (or tuple of values) to another value. The mapped value never varies; if it did, it would

Re: allow line break at operators

2011-09-04 Thread rantingrick
On Sep 4, 10:22 am, ron3200 ron3...@gmail.com wrote: I think this is one of those areas where computers and people differ, but it may also depend on the persons native language as to what works better for them. Yes but what works better for them is not always a better way of doing things!

Re: Installing WebDAV server

2011-09-04 Thread Thomas 'PointedEars' Lahn
Fokke Nauta wrote: Thomas 'PointedEars' Lahn pointede...@web.de wrote in message news:109595831.vcn276c...@pointedears.de... cut If you don't have anything better to contribute, please stop answering. Es gen�gt schon. I should have expected as much from an address munger. *plonk* --

Re: Tkinter label height to fit content

2011-09-04 Thread Bart Kastermans
rantingrick rantingr...@gmail.com writes: On Sep 3, 5:15 pm, Bart Kastermans bkast...@gmail.com wrote: Any suggestions? Yeah, have you considered using the linespace() method of tk.Font objects to calculate the height? Although i must say it feels as if your doing something you should not

Re: Functions vs OOP

2011-09-04 Thread William Gill
On 9/4/2011 2:32 PM, Terry Reedy wrote: On 9/4/2011 4:13 AM, tinn...@isbd.co.uk wrote: Ian Kellyian.g.ke...@gmail.com wrote: Functional programming is about using functions in the *mathematical* sense. A mathematical function maps one value (or tuple of values) to another value. The mapped

[RELEASED] Python 3.2.2

2011-09-04 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the Python 3.2.2 maintenance release. Python 3.2.2 mainly fixes `a regression http://bugs.python.org/12576`_ in the ``urllib.request`` module that prevented opening many HTTP resources

Re: Tkinter label height to fit content

2011-09-04 Thread rantingrick
On Sep 4, 2:39 pm, Bart Kastermans bkast...@gmail.com wrote: I get bits of information over RSS, these are of varying length.  I want to show 10 at a time, and scroll through them.  Now when I scroll the window grows and shrinks depending on their size, I want to right from the start make it

Re: Tkinter label height to fit content

2011-09-04 Thread rantingrick
On Sep 4, 2:39 pm, Bart Kastermans bkast...@gmail.com wrote: Thx.  That function should allow for a bit of robustness. Correction. The function is actually tkFont.metrics(arg) which takes linespace as an optional argument. -- http://mail.python.org/mailman/listinfo/python-list

pyOpenSSL 0.13 release

2011-09-04 Thread exarkun
Hello all, I'm happy to announce the release of pyOpenSSL 0.13. With this release, pyOpenSSL now supports OpenSSL 1.0. Additionally, pyOpenSSL now works with PyPy. Apart from those two major developments, the following interesting changes have been made since the last release: *

Re: Functions vs OOP

2011-09-04 Thread Steven D'Aprano
William Gill wrote: The source of my error is Functional Programming HOWTO (/python-3.1.3-docs-html/howto/functional.html) For those who don't have access to William's local file system, I expect he's looking at this: http://docs.python.org/release/3.1.3/howto/functional.html or the most

Re: Functions vs OOP

2011-09-04 Thread William Gill
On 9/4/2011 7:41 PM, Steven D'Aprano wrote: William Gill wrote: The source of my error is Functional Programming HOWTO (/python-3.1.3-docs-html/howto/functional.html) For those who don't have access to William's local file system, I expect he's looking at this:

Re: Functions vs OOP

2011-09-04 Thread Chris Angelico
On Mon, Sep 5, 2011 at 9:41 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: http://docs.python.org/dev/howto/functional.html What about the entire Introduction section, which starts with this statement? This section explains the basic concept of functional programming If

[issue12678] test_packaging and test_distutils failures under Windows

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 6fe19f421a16 by Nadeem Vawda in branch '3.2': Issue #12678: Fix distutils sdist test on Windows. http://hg.python.org/cpython/rev/6fe19f421a16 New changeset b173cfbf49a0 by Éric Araujo in branch '3.2': Fix distutils

[issue5301] add mimetype for image/vnd.microsoft.icon (patch)

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset cba2558b73ee by Sandro Tosi in branch '3.2': #5301: add image/vnd.microsoft.icon (.ico) MIME type http://hg.python.org/cpython/rev/cba2558b73ee -- ___ Python tracker

[issue12213] BufferedRandom: issues with interlaced read-write

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8de8945ebfc3 by Antoine Pitrou in branch '3.2': Issue #12213: make it clear that BufferedRWPair shouldn't be called with the http://hg.python.org/cpython/rev/8de8945ebfc3 --

[issue11360] In documentation of getopt, advertise argparse instead of optparse

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset dff0f4db67da by Éric Araujo in branch '3.2': Remove outdated pointer to optparse (fixes #11360). http://hg.python.org/cpython/rev/dff0f4db67da -- ___ Python tracker

[issue12141] sysconfig.get_config_vars('srcdir') fails in specific cases

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 402c4bbedf9c by Éric Araujo in branch '3.2': Refactor the copying of xxmodule.c in distutils tests (#12141). http://hg.python.org/cpython/rev/402c4bbedf9c -- ___ Python

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 265da863d017 by Victor Stinner in branch '3.2': Issue #12326: sys.platform is now always 'linux2' on Linux http://hg.python.org/cpython/rev/265da863d017 New changeset e11b4c945f7e by Georg Brandl in branch '3.2':

[issue12672] Some problems in documentation extending/newtypes.html

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8083e51522ee by Eli Bendersky in branch '3.2': Issue #12672: remove confusing part of sentence in documentation http://hg.python.org/cpython/rev/8083e51522ee -- ___

[issue12333] test_distutils and test_packaging failures under Solaris

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 137e45f15c0b by Antoine Pitrou in branch '3.2': Issue #12333: fix test_distutils failures under Solaris and derivatives http://hg.python.org/cpython/rev/137e45f15c0b --

[issue9651] ctypes crash when writing zerolength string buffer to file

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f19d00b5220a by Amaury Forgeot d'Arc in branch '3.2': Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to http://hg.python.org/cpython/rev/f19d00b5220a --

[issue12761] Typo in Doc/license.rst

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5b21312c3800 by Sandro Tosi in branch '3.2': #12761: fix wording of zlib license section http://hg.python.org/cpython/rev/5b21312c3800 -- ___ Python tracker

[issue12781] Mention SO_REUSEADDR near socket doc examples

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 126069a5ecf6 by Sandro Tosi in branch '3.2': #12781: Mention SO_REUSEADDR flag near socket examples http://hg.python.org/cpython/rev/126069a5ecf6 -- ___ Python tracker

[issue12838] FAQ/Programming typo: range[3] is used

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 6e156a6c4fd9 by Georg Brandl in branch '3.2': Close #12838: fix range() call. http://hg.python.org/cpython/rev/6e156a6c4fd9 -- ___ Python tracker rep...@bugs.python.org

[issue10946] bdist doesn’t pass --skip-build on to subcommands

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a78629c62ee8 by Éric Araujo in branch '3.2': Make bdist_* commands respect --skip-build passed to bdist (#10946) http://hg.python.org/cpython/rev/a78629c62ee8 -- ___

[issue12839] zlibmodule cannot handle Z_VERSION_ERROR zlib error

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2fb00b6ed17c by Nadeem Vawda in branch '3.2': Issue #12839: Fix crash in zlib module due to version mismatch. http://hg.python.org/cpython/rev/2fb00b6ed17c -- ___ Python

[issue12725] Docs: Odd phrase floating seconds in socket.html

2011-09-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8730fdc9349f by Ezio Melotti in branch '3.2': #12725: fix working. Patch by Ben Hayden. http://hg.python.org/cpython/rev/8730fdc9349f -- ___ Python tracker

[issue11678] Add support for Arch Linux to platform.linux_distributions()

2011-09-04 Thread Westley Martínez
Westley Martínez aniko...@gmail.com added the comment: Is there anything preventing the patch from being committed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11678 ___

[issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates

2011-09-04 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: From Chapter 03 of the Unicode Standard 6[0], D91: • UTF-16 encoding form: The Unicode encoding form that assigns each Unicode scalar value in the ranges U+..U+D7FF and U+E000..U+ to a single unsigned 16-bit code unit with the

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-09-04 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Regenerated the get_opinfo patch against current 3.3 tip. Still haven't fixed the missing doc updates mentioned in my last message, though. -- Added file: http://bugs.python.org/file23095/issue11816_get_opinfo_branch_20110904.diff

[issue11682] PEP 380 reference implementation for 3.3

2011-09-04 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Uploaded a patch that should be complete. Note that my pep380 branch is based on my get_opinfo branch (see #11816), so if you're applying patches manually rather than updating directly from my sandbox with hg, you'll need to apply the latest

[issue11682] PEP 380 reference implementation for 3.3

2011-09-04 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Actually, not assigning to Raymond for review yet, after all - I just noticed there are some of Benjamin's review comments relating to cosmetic details rather than functionality that I still need to address. I'll kick it in Raymond's

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-09-04 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Here's a patch adding a configure-time check. Since the functions are checked without being linked explicitely with pthread, it should do the trick (I couldn't test it on OpenBSD though). I also added a skipTest to

[issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates

2011-09-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Ezio Melotti wrote: New submission from Ezio Melotti ezio.melo...@gmail.com: From Chapter 03 of the Unicode Standard 6[0], D91: • UTF-16 encoding form: The Unicode encoding form that assigns each Unicode scalar value in the ranges

[issue12885] distutils.filelist.findall() fails on broken symlink in Py2.x

2011-09-04 Thread Alexander Dutton
Alexander Dutton alexander.dut...@oucs.ox.ac.uk added the comment: I've come across it as I'm creating a Debian package of the Python package in the same tree — I'm happy to be told this is a Bad Idea and that they should be in different places. The broken symlinks are relative and in

[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads

2011-09-04 Thread Remi Pointel
Remi Pointel pyt...@xiri.fr added the comment: Hi, it seems to solve the problem (tested on OpenBSD 4.9 and OpenBSD-current). * test_posix.py on OpenBSD 4.9: [...] Ran 79 tests in 0.508s OK (skipped=35) * test_posix.py on OpenBSD-current: it continues to segfault, but I have opened an other

[issue10914] Python sub-interpreter test

2011-09-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It is possible to install the _testembed.c file alongside xxmodule.c and compile it at test time. We probably could, using the approach from the distutils patch. But it feels really quirky to me. Granted, the Makefile is quirky as well. To

[issue12893] Invitation to connect on LinkedIn

2011-09-04 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12893 ___

[issue11155] multiprocessing.Queue's put() signature differs from docs

2011-09-04 Thread Westley Martínez
Westley Martínez aniko...@gmail.com added the comment: ¡Hola! Just checking in. The documentation is still incorrect for all versions. There's a patch that fixes it ready to be reviewed. -- ___ Python tracker rep...@bugs.python.org

[issue11340] test_distutils fails because of borked compress program

2011-09-04 Thread Westley Martínez
Westley Martínez aniko...@gmail.com added the comment: I emailed the Arch Linux people to get more information on this particular issue. If they decide that the compress program will stay as is I will write attempt to write a patch to skip the test based on the output of compress's --version

[issue12894] pydoc help(modules keyword) is failing when a module throws an exception at the import time

2011-09-04 Thread Christian S. Perone
New submission from Christian S. Perone christian.per...@gmail.com: Pydoc is failing when running the ModuleScanner().run() when you execute: help(modules keyword) ... if some module throws an exception at the import time. See this example: help(modules convolve) Here is a list of matching

[issue12895] In MSI/EXE installer, allow installing Python modules in free path

2011-09-04 Thread Ram Rachum
New submission from Ram Rachum r...@rachum.com: Currently, when you use an MSI installer (and possibly also EXE) for a Python module, it automatically detects the location of your various system's Python installations. This is very convenient. However, this can be a problem sometimes, if your

[issue12894] pydoc help(modules keyword) is failing when a module throws an exception at the import time

2011-09-04 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Thanks for the suggested fix. It looks like the problem and fix have already been documented in Issue7425. Merging this into the existing issue. -- nosy: +ned.deily resolution: - duplicate stage: - committed/rejected status: open - closed

[issue7425] [PATCH] Improve the robustness of pydoc -k in the face of broken modules

2011-09-04 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +Christian.S..Perone, ned.deily versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7425 ___

[issue3132] implement PEP 3118 struct changes

2011-09-04 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Is this work something that might be suitable for the features/pep-3118 repo (http://hg.python.org/features/pep-3118/) ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3132

[issue9969] tokenize: add support for tokenizing 'str' objects

2011-09-04 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Attached is a first cut at a patch. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file23099/issue9969.patch ___ Python tracker rep...@bugs.python.org

[issue1172711] long long support for array module

2011-09-04 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Here is a refresh of this patch for 3.3. Please review. -- Added file: http://bugs.python.org/file23100/issue-1172711.patch ___ Python tracker rep...@bugs.python.org

[issue11155] multiprocessing.Queue's put() signature differs from docs

2011-09-04 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11155 ___ ___ Python-bugs-list

[issue12896] Recommended location of the interpreter for Python 3

2011-09-04 Thread Lennart Regebro
New submission from Lennart Regebro rege...@gmail.com: The documentation on Using Python, 2.3. Python-related paths and files says that exec_prefix/bin/python is the recommended location for the interpreter, while for Python 3 it's exec_prefix/bin/python3.