Re: Use and usefulness of the as syntax

2011-11-13 Thread 0xfn
On Nov 12, 7:48 am, Rafael Durán Castañeda rafadurancastan...@gmail.com wrote: El 12/11/11 13:43, Tim Chase escribió:   I hate trying to track down variable-names if one did something like   from Tkinter import * +1 Really, this questionable code is always mentioned as example in Tkinter

RE: Dynamically altering __init__

2011-11-13 Thread Kääriäinen Anssi
I wrote: I will post a link to a complete example once I have done the AST transformations etc. I hope this will be useful to readers of this list. I didn't find such an example, so maybe the next asker will find it... Finally got time to do this. The example can be found at:

socket.socket.makefile

2011-11-13 Thread Matt Joiner
I'm writing an alternative socket module, and have come across the code for the makefile call, which mentions the following: (XXX refactor to share code?) http://hg.python.org/cpython/file/27adb952813b/Lib/socket.py#l149 Has this been refactored elsewhere? Is there something I can use to wrap the

How to indent blocks when readline completion is on?

2011-11-13 Thread Steven D'Aprano
I have set up readline completion as described here: http://docs.python.org/library/rlcompleter.html Now how do I indent blocks in the interactive interpreter? If I press the TAB key, the completer prompts me instead of indenting: readline.parse_and_bind(tab: complete) while True: ...

Re: How to indent blocks when readline completion is on?

2011-11-13 Thread Chris Angelico
On Mon, Nov 14, 2011 at 12:30 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I thought I could add a wrapper around the rlcompleter method, like this: import readline import rlcompleter readline.parse_and_bind(tab: complete) completer = readline.get_completer() def

Re: xmlrpclib date times and a trailing Z

2011-11-13 Thread Travis Parks
On Nov 11, 7:20 pm, Travis Parks jehugalea...@gmail.com wrote: I am trying to connect to Marchex's a call tracking software using xmlrpclib. I was able to get some code working, but I ran into a problem dealing with transfering datetimes. When I construct a xmlrpclib.ServerProxy, I am setting

Uninstalling Py 2.5.2 from Windows 7

2011-11-13 Thread W. eWatson
For many months I had sporadically used 2.5.2 under Win 7, then something went awry. I tried an uninstall/install and it didn't get any better. I thought I'd take another shot at it today. The uninstall went OK, but c:\python25 remained with several py files and a folder, Lib. I went ahead

can't decompress data; zlib not available

2011-11-13 Thread Steve Edlefsen
Hi, I'm trying to install a tool for Plone called ZopeSkel, but when I run the setup file ez_setup.py, I get dr_shred@merle:~$ ez_setup.py Downloading http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c11-py2.4.egg Traceback (most recent call last): File

(n00b) Tkinter trouble

2011-11-13 Thread Jason Swails
Hello, I'm trying my hand at creating a Tkinter application, but not having much luck. I'm trying to have my top level window be a series of buttons with different options on them. Every time a button is pressed, it opens up a new window with options. While that new window is open, all of the

Re: Uninstalling Py 2.5.2 from Windows 7

2011-11-13 Thread Irmen de Jong
On 13-11-11 18:46, W. eWatson wrote: For many months I had sporadically used 2.5.2 under Win 7, then something went awry. I tried an uninstall/install and it didn't get any better. I thought I'd take another shot at it today. The uninstall went OK, but c:\python25 remained with several py files

Re: can't decompress data; zlib not available

2011-11-13 Thread Tim Wintle
On Sun, 2011-11-13 at 11:17 -0700, Steve Edlefsen wrote: which appears to install zlib when python is reinstalled. Except I can't run make without errors and there is no configuration file. How do I reinstall python to include zlib? Which OS are you on? Linux? BSD? How did you install

Re: Uninstalling Py 2.5.2 from Windows 7

2011-11-13 Thread Terry Reedy
On 11/13/2011 12:46 PM, W. eWatson wrote: For many months I had sporadically used 2.5.2 under Win 7, then something went awry. I tried an uninstall/install and it didn't get any better. I thought I'd take another shot at it today. The uninstall went OK, but c:\python25 remained with several py

Re: Use and usefulness of the as syntax

2011-11-13 Thread Terry Reedy
On 11/13/2011 3:55 AM, 0xfn wrote: On Nov 12, 7:48 am, Rafael Durán Castañeda rafadurancastan...@gmail.com wrote: El 12/11/11 13:43, Tim Chase escribió: I hate trying to track down variable-names if one did something like from Tkinter import * +1 Really, this questionable code is

Trying to write beautifulsoup result to a file and get error message

2011-11-13 Thread goldtech
If I try: ... soup = BeautifulSoup(ft3) f = open(r'c:\NewFolder\clean4.html', w) f.write(soup) f.close() I get error message: Traceback (most recent call last): File C:\Documents and Settings\user01\Desktop\py\tb1a.py, line 203, in module f.write(soup) TypeError: expected a character

Re: Trying to write beautifulsoup result to a file and get error message

2011-11-13 Thread MRAB
On 13/11/2011 22:37, goldtech wrote: If I try: ... soup = BeautifulSoup(ft3) f = open(r'c:\NewFolder\clean4.html', w) f.write(soup) f.close() I get error message: Traceback (most recent call last): File C:\Documents and Settings\user01\Desktop\py\tb1a.py, line 203, inmodule

Re: Uninstalling Py 2.5.2 from Windows 7

2011-11-13 Thread W. eWatson
On 11/13/2011 2:08 PM, Terry Reedy wrote: On 11/13/2011 12:46 PM, W. eWatson wrote: For many months I had sporadically used 2.5.2 under Win 7, then something went awry. I tried an uninstall/install and it didn't get any better. I thought I'd take another shot at it today. The uninstall went OK,

Re: Uninstalling Py 2.5.2 from Windows 7

2011-11-13 Thread W. eWatson
Well, let be a careful a little more. I have PIL, numpy, scipy, pymatplotlib and pyephem installed, I think. There are Removeexe files in the python25 folder for them. There's also a Removepy2exe.exe. Probably that was somehow used to get out py2.5. --

[ANN] PikoTest.py - a small testing library

2011-11-13 Thread Makoto Kuwata
I released PikoTest.py 0.1.0. http://pypi.python.org/pypi/PicoTest PikoTest.py is a samll testing library for Python. Features: * Structured Test * Setup/Teardown * Fixture Injection * Skip Test * TODO Example:: from __future__ import with_statement import picotest test =

Slave to master auto linking.

2011-11-13 Thread Богун Дмитрий
Hello. I try make some weird thing. I want to get from code like this: class master: ... class slave: ... m = master() s = m.slave() s.master is m Last expression must be true. I want link master to be set automatically by master object while creating slave object. Additional

Re: Slave to master auto linking.

2011-11-13 Thread Chris Angelico
2011/11/14 Богун Дмитрий vuglu...@vugluskr.org.ua: m = master() s = m.slave() s.master is m Can you simply have m.slave() pass a parameter to the slave's constructor? class Master(object): class Slave(object): def __init__(self,master): self.master=master

Re: all() is slow?

2011-11-13 Thread alex23
On Nov 13, 4:28 pm, Devin Jeanpierre jeanpierr...@gmail.com wrote: which implies that getattr(x, 'a!b') should be equivalent to x.a!b No, it does not. The documentation states equivalence for two particular values It states equivalence for two values _based on the name_. If the string is

Re: all() is slow?

2011-11-13 Thread Devin Jeanpierre
It states equivalence for two values _based on the name_. I don't know what you mean. Based on the name doesn't mean anything in particular to me in this context. So you're outright ignoring the comments that this behaviour is to make CPython more performant? I don't see how I'm ignoring the

Re: Uninstalling Py 2.5.2 from Windows 7 (Invalid on Win 32 app)

2011-11-13 Thread W. eWatson
I just pushed aside the python25 folder by renaming it, and installed py 2.5.2. However, when I try to open the simplest of py programs with IDLE, I get an error from Win7. c:\Users\blah\...\junk.py is not a valid Win 32 app. Here's one: def abc(one): print abc: , one, is one def

Re: Get keys from a dicionary

2011-11-13 Thread alex23
On Nov 11, 11:31 pm, macm moura.ma...@gmail.com wrote: I pass a nested dictionary to a function. def Dicty( dict[k1][k2] ): print k1 print k2 There is a fast way (trick) to get k1 and k2 as string. It might be possible to do something using a reverse dictionary and getting

Re: Get keys from a dicionary

2011-11-13 Thread alex23
On Nov 11, 11:31 pm, macm moura.ma...@gmail.com wrote: I pass a nested dictionary to a function. def Dicty( dict[k1][k2] ): print k1 print k2 There is a fast way (trick) to get k1 and k2 as string. It might be possible to do something using a reverse dictionary and getting

Re: (n00b) Tkinter trouble

2011-11-13 Thread Jason Swails
On Sun, Nov 13, 2011 at 1:27 PM, Jason Swails jason.swa...@gmail.comwrote: Hello, I'm trying my hand at creating a Tkinter application, but not having much luck. I'm trying to have my top level window be a series of buttons with different options on them. Every time a button is pressed, it

[issue13394] Patch to increase aifc lib test coverage with couple of minor fixes

2011-11-13 Thread Oleg Plakhotnyuk
Oleg Plakhotnyuk oleg...@gmail.com added the comment: Thanks for your review, Ezio! Here goes new patch with all issues you've mentioned been fixed. -- Added file: http://bugs.python.org/file23678/test_aifc2.patch ___ Python tracker

[issue13395] Python ISO-8859-1 encoding problem

2011-11-13 Thread Hugo Silva
New submission from Hugo Silva hugo...@gmail.com: Hi all, I'm facing a huge encoding problem in Python when dealing with ISO-8859-1 / Latin-1 character set. When using os.listdir to get the contents of a folder I'm getting the strings encoded in ISO-8859-1 (ex: ''Ol\xe1 Mundo''), however in

[issue13395] Python ISO-8859-1 encoding problem

2011-11-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This doesn't seem a bug to me, so you should ask for help somewhere else. You can try to pass a unicode arg to listdir to get unicode back, and double check what the input actually is. -- resolution: - invalid stage: -

[issue13395] Python ISO-8859-1 encoding problem

2011-11-13 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Apparently, you are using the interactive shell on Microsoft Windows. This will use the OEM code page; which one that is depends on the exact Windows regional version you are using. You shouldn't decode the string with 'latin-1', but with

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-11-13 Thread Paul Moore
Changes by Paul Moore p.f.mo...@gmail.com: -- nosy: +pmoore ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for the comments, here is a new patch addressing them. I've kept the C API available in all builds (since it's private), but sys.getallocatedblocks() is only available in debug builds. As for the memory leak run results, I think we may

[issue2771] Test issue

2011-11-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: -python-dev resolution: fixed - stage: committed/rejected - test needed status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771

[issue2771] Test issue

2011-11-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 0e94d9bef251 by Ezio Melotti in branch 'default': Closes #2771. #13388 now needs to be updated. http://hg.python.org/test/rev/0e94d9bef251 -- nosy: +python-dev resolution: - fixed stage: test needed -

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: I noticed that several usages of random.getrandbits() actually need bytes. A few examples: - Lib/test/test_zlib.py calls random.getrandbits(8 * _1M).to_bytes() - Twisted uses the %x format and then call .decode('hex') Another

[issue2771] Test issue

2011-11-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: -python-dev resolution: fixed - stage: committed/rejected - test needed status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771

[issue2771] Test issue

2011-11-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e4fcac92a80a by Ezio Melotti in branch 'default': Closes #2771. #13388 now needs to be updated. http://hg.python.org/test/rev/e4fcac92a80a -- nosy: +python-dev resolution: - fixed stage: test needed -

[issue13388] document hg commit hooks in the devguide

2011-11-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e4fcac92a80a by Ezio Melotti in branch 'default': Closes #2771. #13388 now needs to be updated. http://hg.python.org/test/rev/e4fcac92a80a -- nosy: +python-dev ___ Python

[issue13388] document hg commit hooks in the devguide

2011-11-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: ...because the hook now supports multiple issue id in the same commit message. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13388

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13396 ___ ___

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file23680/debugblocks2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13390 ___

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file23681/debugblocks3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13390 ___

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: And the latest patch (debugblocks3.patch) adds said heuristic. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13390 ___

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Good idea, IMO. +cum = set() +for i in range(100): +val = getbytes(span) +cum |= set(i for i in range(span) if val[i]) +self.assertEqual(len(cum), span) I find this test a bit

[issue13204] sys.flags.__new__ crashes

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for the patch. You should add the same tests for sys.version_info and sys.getwindowsversion. -- nosy: +pitrou stage: - patch review ___ Python tracker rep...@bugs.python.org

[issue13355] random.triangular error when low = high=mode

2011-11-13 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I've got this one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13355 ___ ___

[issue13217] Missing header dependencies in Makefile

2011-11-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 36375075d6aa by Antoine Pitrou in branch 'default': Issue #13217: add missing header dependencies in the Makefile for unicodeobject.o. http://hg.python.org/cpython/rev/36375075d6aa -- nosy: +python-dev

[issue13217] Missing header dependencies in Makefile

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thank you for the patch. I only applied it to 3.3, since 3.2 doesn't have the additional header files. -- resolution: - invalid stage: patch review - committed/rejected status: open - closed versions: -Python 3.2

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13396 ___ ___

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: How would this work for other random number generators that don't supply genrand_int32()? The API for random is supposed to be easily subclassable and reusable for other random number generators. The requirements for those

[issue13388] document hg commit hooks in the devguide

2011-11-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Nice, I didn't know about issue #2771 ;-) Will update the patch! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13388 ___

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: How would this work for other random number generators that don't supply genrand_int32()? genrand_int32 is an internal function, only available in C for the Mersenne Twister generator. random.SystemRandom() should provide

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: genrand_int32 is an internal function, only available in C for the Mersenne Twister generator. Yes, I know. I'm the one added that code ;-) I don't know other generators. The problem is that we need an API that will

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The problem is that we need an API that will accommodate other random number generators and not be specific to the MersenneTwister. Right now, the starting point for everything in the random module is an underlying generator supplying a

[issue13397] Option for XMLRPC clients to automatically transform Fault exceptions into standard exceptions

2011-11-13 Thread Raymond Hettinger
New submission from Raymond Hettinger raymond.hettin...@gmail.com: Currently, an XMLRPC client communicating with a server running Python can make Python style calls but exceptions get collapsed into a standard FaultException making it difficult to program in a Pythonic style: proxy =

[issue13397] Option for XMLRPC clients to automatically transform Fault exceptions into standard exceptions

2011-11-13 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- components: +Library (Lib) priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13397 ___

[issue13397] Option for XMLRPC clients to automatically transform Fault exceptions into standard exceptions

2011-11-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +flox, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13397 ___ ___ Python-bugs-list

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: ./python -m timeit -s from random import getrandbits getrandbits(800).to_bytes(100, 'little') 10 loops, best of 3: 25 msec per loop ./python -m timeit -s from random import getrandbytes getrandbytes(100) 100 loops, best of

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: Removed file: http://bugs.python.org/file23679/getrandbytes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13396 ___

[issue12875] backport re.compile flags default value documentation

2011-11-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 87ecfd5cd5d1 by Eli Bendersky in branch '2.7': Normalize the keyword arguments documentation notation in re.rst. Closes issue #12875 http://hg.python.org/cpython/rev/87ecfd5cd5d1 --

[issue12875] backport re.compile flags default value documentation

2011-11-13 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___ ___ Python-bugs-list

[issue13388] document hg commit hooks in the devguide

2011-11-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: An updated patch attached, explaining that several issues can be mentioned in a single commit message -- Added file: http://bugs.python.org/file23683/issue13388.2.patch ___ Python tracker

[issue13239] Remove operator from Grammar/Grammar

2011-11-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a259511351d9 by Eli Bendersky in branch '3.2': Clarify the existence of the operator in Grammar/Grammar with a comment, for issue 13239 http://hg.python.org/cpython/rev/a259511351d9 New changeset 410115400838 by

[issue13386] Document documentation conventions for optional args

2011-11-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Ezio, regarding your latest message: The problem is when the default placeholder is some unique object() or some _internal value (we had something similar with a socket timeout once). I hope this should be rare enough not to present a

[issue13398] _cursesmodule missing Python.h on Solaris

2011-11-13 Thread Maciej Bliziński
New submission from Maciej Bliziński maciej.blizin...@gmail.com: Compilation of Python 3.2.2 fails on Solaris 9 as follows: /opt/SUNWspro/bin/cc -xcode=pic32 -xO3 -m32 -xarch=v8 -I/opt/csw/include -c ./Modules/_cursesmodule.c -o Modules/_cursesmodule.o ./Modules/_cursesmodule.c, line 105:

[issue13398] _cursesmodule does not build, doesn't find Python.h on Solaris

2011-11-13 Thread Maciej Bliziński
Changes by Maciej Bliziński maciej.blizin...@gmail.com: -- title: _cursesmodule missing Python.h on Solaris - _cursesmodule does not build, doesn't find Python.h on Solaris ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13398

[issue11836] multiprocessing.queues.SimpleQueue is undocumented

2011-11-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Sandro - yep, the sentinels arg is also undocumented in multiprocessing.PipeConnection.recv() and further down the road... -- ___ Python tracker rep...@bugs.python.org

[issue13229] Improve tools for iterating over filesystem directories

2011-11-13 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: And walkdir is now a published package: http://walkdir.readthedocs.org My plan for this issue now is to maintain walkdir as a standalone package for 2.7 and 3.2, but still add the functionality to shutil for 3.3+. However, I'll gather

[issue11836] multiprocessing.queues.SimpleQueue is undocumented

2011-11-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: However, sentinels *are* mentioned in the multiprocessing doc, below multiprocessing.Process: sentinel A numeric handle of a system object which will become “ready” when the process ends. On Windows, this is an OS handle usable with

[issue13374] Deprecate usage of the Windows ANSI API in the nt module

2011-11-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I notice that the patch changes rename() and link() to use win32_decode_filename() to coerce the filename to unicode before using the wide win32 api. Well, I did that to simplify the source code. (Previously, rename() first

[issue13396] new method random.getrandbytes()

2011-11-13 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: The differential cost of generating n random bytes is negligible compared to actually doing anything with the bytes once their generated. This optimization is close to being a total waste (saving 15 milliseconds for the

[issue12875] backport re.compile flags default value documentation

2011-11-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - fixed stage: commit review - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___

[issue13386] Document documentation conventions for optional args

2011-11-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: You should also explicitly specify what happens in several optional but not keyword args are needed. AFAIU the convention is: func(arg1, arg2[, opt1, opt2]) IIUC that would mean that either you pass only arg1 and arg2, or you also

[issue13386] Document documentation conventions for optional args

2011-11-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: What you say makes sense, now I just have to dig up where I saw instances of [, opt1, opt2] If anything, this is another proof that such conventions must be agreed upon and meticulously documented. --