Re: [Python-Dev] Documenting [C]Python's Internals

2010-05-19 Thread Michael Foord
not they become part of the Python documentation I have very much enjoyed and appreciated this series of blog entries. I still covet the ability to contribute to Python in C and these articles are a great introduction to the underlying Python interpreter and object system. Please continue!

Re: [Python-Dev] Reasons behind misleading TypeError message when passing the wrong number of arguments to a method

2010-05-19 Thread Michael Foord
and I sometimes do a double-take myself. All the best, Michael --- Giampaolo http://code.google.com/p/pyftpdlib http://code.google.com/p/psutil ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-de

Re: [Python-Dev] Reasons behind misleading TypeError message when passing the wrong number of arguments to a method

2010-05-20 Thread Michael Foord
unbound methods is a much less common error than calling bound methods with the wrong number of arguments... All the best, Michael Foord --- Giampaolo http://code.google.com/p/pyftpdlib http://code.google.com/p/psutil ___ Python-Dev mailing lis

Re: [Python-Dev] Unordered tuples/lists

2010-05-20 Thread Michael Foord
ues for comparing sequences of heterogenous types - both prettyprint and unittest I believe. Perhaps a standard recipe for comparing or sorting such containers *does* belong somewhere more obvious.) All the best, Michael Maybe with a better implementation I would go +0, but I'm hard presse

Re: [Python-Dev] Reasons behind misleading TypeError message when passing the wrong number of arguments to a method

2010-05-21 Thread Michael Urman
a() What should C.a(), C().a(), and C().a(1) each yield? Does it change if c(self, k) calls C.a(self)? -- Michael Urman ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python

Re: [Python-Dev] Documenting [C]Python's Internals

2010-05-21 Thread Michael Foord
rt of coverage of the topic you are aiming for you can then take your blog articles, along with all feedback, and turn them into documentation. All the best, Michael ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/l

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-26 Thread Michael Foord
o be a community initiative and would take some time to establish. A "fat" distribution like this, based on tools like pip and distribute would be great for both newbies and for experienced programmers in making it easier to find "best" solutions for standard proble

Re: [Python-Dev] variable name resolution in exec is incorrect

2010-05-26 Thread Michael Foord
ggestions for improving the exec documentation in this area would be appreciated. Your explanation here is very clear. Is this in the documentation? Michael Cheers, Nick. -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading thi

Re: [Python-Dev] variable name resolution in exec is incorrect

2010-05-26 Thread Michael Foord
te global and local scopes for top-level code is screwy in the first place. Are there any use cases for it? Maybe the second scope argument to exec() should be deprecated? Sounds good to me, certainly ends the confusion over this undoubtedly unintuitive behaviour. :-) Michael -- http://ww

Re: [Python-Dev] Sumo

2010-05-27 Thread Michael Foord
host of modules on PyPI many of which are unmaintained, immature or simply rubbish. A standardised solution makes choosing solutions for common problems *dramatically* easier, and may save people much heartache and frustration. For that to work though it needs to be well curated and g

Re: [Python-Dev] Windows registry path not ignored with Py_IgnoreEnvironmentFlag set

2010-06-05 Thread Michael Foord
it works fine. This is one of the things py2exe does to create 'standalone' Python programs for Windows. Michael I believe so. The path of executable and Python DLL are used to initialize sys.path, which should be enough to find the necessary files. __

Re: [Python-Dev] Reintroduce or drop completly hex, bz2, rot13, ... codecs

2010-06-09 Thread Michael Foord
ed data, for example, it is debatable whether you want it as ASCII bytes or unicode text. But in both cases you probably want bytes -> bytes and str -> str. If you want text out then put text in, if you want bytes out then put bytes in. Michael _

Re: [Python-Dev] Future of 2.x.

2010-06-09 Thread Michael Foord
n core developers (basically) *have* moved on and are unlikely to further develop 2.x. We'll see though, it's all speculation at the moment. All the best, Michael I don't see why we have to make such work harder than it need be. regards Steve -- http://www.ironpyt

Re: [Python-Dev] Are PyCFunctions supposed to invisibly consume self when used as a method?

2010-06-12 Thread Michael Foord
of one. method or instancemethod perhaps? Michael I wish the warning could happen at class definition time, but I expect that there are use cases where the warning is unnecessary (because the code happens to be structured so as to never call it through the instance) or even wrong (wh

Re: [Python-Dev] email package status in 3.X

2010-06-18 Thread Michael Foord
an experimental release, and by most standards 3.1 (in terms of the core language and functionality) was a solid release. Any reasonable expectation about Python 3 adoption predicted that it would take years, and would include going through a phase of difficulty and di

Re: [Python-Dev] email package status in 3.X

2010-06-18 Thread Michael Foord
tal release. That is not true of 3.1 and future releases. All the best, Michael That's not a problem, unless you drop the word "beta". And if you're still not buying that, imagine the sort of response you'd get if you tried to sell software that billed itse

Re: [Python-Dev] email package status in 3.X

2010-06-18 Thread Michael Foord
s own but if it was only recently discovered that indicates that it probably isn't such a big deal - either way it needs fixing, but using Python for writing cgis hasn't been a big use case for a long time. All the best, Michael What I'm suggesting is that extreme caution be ex

Re: [Python-Dev] email package status in 3.X

2010-06-18 Thread Michael Foord
On 18/06/2010 23:51, Raymond Hettinger wrote: On Jun 18, 2010, at 3:08 PM, Michael Foord wrote: I'm still baffled as to how a bug in the cgi module (along with the acknowledged email problems) is such a big deal. Was it reported and then languished in the bug tracker? That would b

Re: [Python-Dev] #Python3 ! ? (was Python Library Support in 3.x)

2010-06-20 Thread Michael Foord
is _way_ bigger than the room an IRC topic gives you. Hey Laurens - I don't have an issue with with anything you've said, but given the topic is far more nuanced than an IRC topic can express maybe that just isn't the right place for it. Michael Yes, it's an imper

Re: [Python-Dev] Python Library Support in 3.x (Was: email package status in 3.X)

2010-06-20 Thread Michael Foord
right version more often (and be writing Python 2 that will more easily migrate to Python 3, if they cannot yet use 3). Yep. All the best, Michael Foord There seems to be a perception that the PSF can help fund developments, and indeed Jesse Noller has made a small start with his sprint fund

Re: [Python-Dev] email package status in 3.X

2010-06-21 Thread Michael Urman
apparently either a string is not a character buffer, or the docs are incorrect. http://docs.python.org/py3k/library/functions.html?highlight=str#str However it looks like this is consistent with int. >>> int(4, 0) TypeError: int() can't convert non-string with explicit ba

Re: [Python-Dev] bytes / unicode

2010-06-21 Thread Michael Foord
aving. Is it too late to make that tradeoff? Probably. Certainly it's not practical to *implement* outside the language core, and removing string methods would fux0r anybody whose currently-ported code relies on bytes objects having string-like methods. Why is your proposed bstr wra

Re: [Python-Dev] red buildbots on 2.7

2010-06-21 Thread Michael Foord
What are the requirements for moving the OS X buildbots into the stable view? Are the builders themselves stable enough? (If the requirement is that the buildbots be green then it is something of a catch-22.) All the best, Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.or

Re: [Python-Dev] red buildbots on 2.7

2010-06-21 Thread Michael Foord
t;for Bill" it is fixing them for Python. All the best, Michael Regards Antoine. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-d

Re: [Python-Dev] red buildbots on 2.7

2010-06-21 Thread Michael Foord
is failing is the ctypes test suite, and there only a single test. I don't think this is sufficient reason to block the release. Bill listed several other failures he saw on the buildbots and I see the same set, plus test_posix. All the best, Michael Regards, Martin -- http:/

Re: [Python-Dev] red buildbots on 2.7

2010-06-21 Thread Michael Foord
g it - but there was some disagreement on what is the *best* way to fix it. Two of the other failures I'm pretty sure are problems in the test suite rather than bugs (as Bill said) and I'm not sure about the ctypes issue. Just starting a full build here. Michael That would make them

Re: [Python-Dev] red buildbots on 2.7

2010-06-21 Thread Michael Foord
On 21/06/2010 22:52, Michael Foord wrote: On 21/06/2010 22:36, "Martin v. Löwis" wrote: Bill listed several other failures he saw on the buildbots and I see the same set, plus test_posix. Still, the question would be whether any of these failures can manage to block a release

Re: [Python-Dev] email package status in 3.X

2010-06-22 Thread Michael Urman
On Tue, Jun 22, 2010 at 00:28, Stephen J. Turnbull wrote: > Michael Urman writes: > >  > It is somewhat troublesome that there doesn't appear to be an obvious >  > built-in idempotent-when-possible function that gives back the >  > provided bytes/str, > > If

Re: [Python-Dev] UserDict in 2.7

2010-06-22 Thread Michael Foord
hrough your new __getitem__.) In 2.6+ you can of course use the collections.MutableMapping abc, but if you want to write cross-Python version code UserDict is still useful. If you want abc support then you are *already* on 2.6+ though I guess. All the best, Michael If not, I don't thi

Re: [Python-Dev] bytes / unicode

2010-06-22 Thread Michael Foord
rted these as bugs and I try and ferret them out as I find them. All the best, Michael Too bad we can't add such porting enhancements to Python2 anymore Perhaps a 'py3compat' module on pypi, with things like the py._builtin reraise helper and so forth ? -Rob __

Re: [Python-Dev] bytes / unicode

2010-06-22 Thread Michael Foord
was handled in Python 2. All the best, Michael even when you don't care -- all you really wanted to do is pass it from one API to another, with some well-defined transformations, which don't actually depend on it having being decoded properly. (For example, extracting the path from

Re: [Python-Dev] email package status in 3.X

2010-06-22 Thread Michael Urman
On Tue, Jun 22, 2010 at 15:32, Terry Reedy wrote: > On 6/22/2010 9:24 AM, Michael Urman wrote: >> These are trivial functions; >> I just don't fully understand why the capability isn't baked in. > > Possible reasons: They are special purpose functions easily

Re: [Python-Dev] bytes / unicode

2010-06-24 Thread Michael Foord
on3, things have to be done explicity and I think we need to add a few helpers to make writing such str/bytes interfaces easier. We've already had some suggestions in that area, but probably need to collect a few more ideas based on real-life porting attempts. I'd like to make this a t

Re: [Python-Dev] thoughts on the bytes/string discussion

2010-06-24 Thread Michael Foord
w ABC would go into the stdlib (I assume in collections or string) the moratorium does not apply. Although it would require changes for builtin types like file to work with a new string ABC, right? Michael ___ Python-Dev mailing list Pytho

[Python-Dev] Creating APIs that work as both decorators and context managers

2010-06-25 Thread Michael Foord
something: pass I'm not entirely happy with the name of the class or the start and finish methods, so open to suggestions there. start and finish *could* be __enter__ and __exit__ - but that would make the class you implement *look* like a normal context manager and I thought it was

Re: [Python-Dev] "2 or 3" link on python.org

2010-06-25 Thread Michael Foord
we can get it done. All the best, Michael Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyma

Re: [Python-Dev] Creating APIs that work as both decorators and context managers

2010-06-25 Thread Michael Foord
On 25/06/2010 19:35, Michael Foord wrote: Hello all, I've put a recipe up on the Python cookbook for creating APIs that work as both decorators and context managers and wonder if it would be considered a useful addition to the functools module. http://code.activestate.com/recipes/5

Re: [Python-Dev] "2 or 3" link on python.org

2010-06-25 Thread Michael Foord
g-www I'll predict that this is its death :-( Heh. Michael Regards, Martin -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligatio

Re: [Python-Dev] [ANN]: "newthreading" - an approach to simplified thread usage, and a path to getting rid of the GIL

2010-06-26 Thread Michael Foord
ading semantics (so you can't share non-frozen objects between threads) would not be acceptable. That comment is likely to be based on a misunderstanding of your future intentions though. :-) All the best, Michael Foord This is a pure Python implementation of synchronized objects,

Re: [Python-Dev] Access a function

2010-06-28 Thread Michael Foord
ut the function should be used. You can find out more on Python functions in the tutorial: http://docs.python.org/tutorial/controlflow.html#more-on-defining-functions All the best, Michael Foord Cheers, Zoh -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CA

Re: [Python-Dev] set/dict comprehensions don't leak in Py2.7 - intentional?

2010-07-05 Thread Michael Foord
erefore "a bug". I don't see it as an issue that set and dict comprehensions don't leak in 2.7 (and in fact it is a good thing as it makes it harder to write code that works in 2.7 but fails in 3.x). Michael TJG ___ Pytho

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Michael Foord
ss of "growing" one. Using ctypes for C extensions is the most portable way of providing C extensions for Python (other than providing a pure-Python implementation of course). Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting a

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Michael Foord
eadable. I would say that the major use of docstrings is for interactive help - so interactive readability should be *the most important* (but perhaps not only) factor when considering how to format standard library docstrings. Michael See http://sphinx.pocoo.org/markup/index.html

Re: [Python-Dev] query: docstring formatting in python distutils code

2010-07-07 Thread Michael Foord
hand autogenerated API docs *can* be good looking and usable. Michael Georg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/option

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Michael Foord
st should take the module under test (either in C or Python) as the parameter and used classes / functions as attributes off the module object. Using a class decorator to duplicate each _test_ into two test_* methods sounds like a good approach. Michael -- http://www.ironpythoninaction.com/ ht

Re: [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

2010-07-07 Thread Michael Foord
ingle method and have the full implementation inherit from the C base class if it is available or otherwise a pure Python base class? Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your emp

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-11 Thread Michael Foord
tain. Speaking of which, the IDLE.app that comes with Python 2.7 for Mac OS X isn't working for me. Anyone else seeing that? All the best, Michael Foord --amk ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/lis

Re: [Python-Dev] maintainers.rst enhancement

2010-07-12 Thread Michael Foord
You can leave me starred for unittest. Michael -- R. David Murray www.bitdance.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.p

Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library

2010-07-12 Thread Michael Foord
Most post hoc review comments come in as replies to the commit notifications :) That mailing list (python-checkins) is way too high traffic for many committers to monitor. I hope people making comments on checkins also email the committer directly. All the best, Michael Hmm, do we mention

Re: [Python-Dev] New regex module for 3.2?

2010-07-12 Thread Michael Foord
ld mean Python could ship with two regex engines but only one interface exposed to the programmer... Michael MRAB's module offers a superset of re's features rather than a subset though, so once it has had more of a chance to bake on PyPI it may be worth another look. Cheers, Nick.

Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library

2010-07-12 Thread Michael Foord
On 12/07/2010 16:52, Nick Coghlan wrote: On Tue, Jul 13, 2010 at 1:07 AM, Michael Foord wrote: That mailing list (python-checkins) is way too high traffic for many committers to monitor. I hope people making comments on checkins also email the committer directly. Not normally, no

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-12 Thread Michael Foord
to tie pip to the Python release schedule. Having pip installed into site-packages by default, so that it *can* be upgraded in place, would be win-win as far as I can tell. Slight thread hijacking I realise... :-) All the best, Michael -- Ian Bicking | http://blog.ianbicking.org _

Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library

2010-07-12 Thread Michael Foord
to be a module. I'm sure Brett will love this idea, but if it was impossible to reimport the script being executed as __main__ with a different name it would solve these problems. Michael Foord -Fred -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog

Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library

2010-07-12 Thread Michael Foord
On 12/07/2010 22:47, Fred Drake wrote: On Mon, Jul 12, 2010 at 5:42 PM, Michael Foord wrote: I'm sure Brett will love this idea, but if it was impossible to reimport the script being executed as __main__ with a different name it would solve these problems. Indeed! And I'

Re: [Python-Dev] [Idle-dev] Removing IDLE from the standard library

2010-07-12 Thread Michael Foord
standard dev procedures and nor do I think it should be. If you can't find an email address then either python-comitters or python-dev would be a better place to send feedback. Michael Cheers, Nick. -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREF

Re: [Python-Dev] avoiding accidental shadowing of top-level libraries by the main module

2010-07-12 Thread Michael Foord
On 12/07/2010 23:05, Nick Coghlan wrote: On Tue, Jul 13, 2010 at 7:47 AM, Fred Drake wrote: On Mon, Jul 12, 2010 at 5:42 PM, Michael Foord wrote: I'm sure Brett will love this idea, but if it was impossible to reimport the script being executed as __main__ with a different na

Re: [Python-Dev] avoiding accidental shadowing of top-level libraries by the main module

2010-07-12 Thread Michael Foord
On 12/07/2010 22:59, Antoine Pitrou wrote: On Mon, 12 Jul 2010 17:47:31 -0400 Fred Drake wrote: On Mon, Jul 12, 2010 at 5:42 PM, Michael Foord wrote: I'm sure Brett will love this idea, but if it was impossible to reimport the script being executed as __main__ with a diff

Re: [Python-Dev] avoiding accidental shadowing of top-level libraries by the main module

2010-07-12 Thread Michael Foord
On 12/07/2010 23:23, Nick Coghlan wrote: On Tue, Jul 13, 2010 at 8:06 AM, Michael Foord wrote: An explicit error being raised instead would be just as good. Ah, refusing the temptation to guess. So the idea would be, when attempting to import __main__ under it's original name

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-12 Thread Michael Foord
on for Windows 7 - so it does exist *sometimes*. Either an XP issue or a "your system" issue I guess. Michael XP with updates, install for everyone, make install the default Python. Should I open a tracker issue? -- http://www.ironpythoninaction.com/ http://www.voidspace.org.u

Re: [Python-Dev] python-checkins replies

2010-07-12 Thread Michael Foord
On 12/07/2010 23:48, Eric Smith wrote: On 7/12/2010 6:04 PM, Michael Foord wrote: Given how high traffic python-checkins is I don't consider that a reasonable place to send follow-up and nor do I consider it the responsibility of committers to monitor it. As you said earlier this *isn'

Re: [Python-Dev] avoiding accidental shadowing of top-level libraries by the main module

2010-07-13 Thread Michael Foord
On 13/07/2010 01:30, Steven D'Aprano wrote: On Tue, 13 Jul 2010 08:05:24 am Nick Coghlan wrote: On Tue, Jul 13, 2010 at 7:47 AM, Fred Drake wrote: On Mon, Jul 12, 2010 at 5:42 PM, Michael Foord wrote: I'm sure Brett will love this idea, but if it was imp

Re: [Python-Dev] New regex module for 3.2?

2010-07-13 Thread Michael Foord
n as maintainer then the advantages seem well worth it to me. Michael Reid ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyma

Re: [Python-Dev] Peculiar import code in pickle.py

2010-07-13 Thread Michael Foord
e "little dance" much more readable. All the best, Michael ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40

Re: [Python-Dev] avoiding accidental shadowing of top-level libraries by the main module

2010-07-13 Thread Michael Foord
name. Michael Making sure both __main__ and the corresponding importable name refers to the same module object seems reasonable. Trying to special case shadowing detection just because the shadowing module happens to also be the main module seems ugly as hell :) Cheers, Nick. --

Re: [Python-Dev] more details of list comprehension in tutorial than in language reference

2010-07-16 Thread Michael Foord
ke to write an addition and post it to the Python bug tracker it would be (very) welcomed for consideration. The tutorial has no single "maintainer" but we are always looking to improve it. All the best, Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.or

Re: [Python-Dev] IDLE contributors and committers

2010-07-17 Thread Michael Foord
l (and other interested parties) as a developer makes a lot of sense. Guilherme's *existing* patch for IDLE looks like it improves it a great deal, at the cost of potentially requiring Tk 8.5 (?). Can this just be committed? https://code.google.com/p/python-ttk/wiki/Scre

Re: [Python-Dev] Markup of command-line options in Python's .rst documentation

2010-07-17 Thread Michael Foord
s own options? If it links to the wrong thing then the markup is incorrect (unless it is due to a regression in Sphinx but I think that is unlikely). Michael Eli ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/l

Re: [Python-Dev] Windows process creation flags

2010-07-18 Thread Michael Foord
ipatrol6...@yahoo.com Could you create an issue on the Python bug tracker for this, preferably with a patch. Thanks Michael Foord ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] mkdir -p in python

2010-07-18 Thread Michael Foord
the python bug tracker, preferably with patch and tests of course! It would be worth searching to see if there is an existing feature request for this, and if so you can add a comment to it. All the best, Michael Foord -- http://www.ironpythoninaction.com/ ___

Re: [Python-Dev] Markup of command-line options in Python's .rst documentation

2010-07-18 Thread Michael Foord
On 17/07/2010 14:44, Eli Bendersky wrote: On Sat, Jul 17, 2010 at 16:26, Michael Foord mailto:fuzzy...@voidspace.org.uk>> wrote: On 17/07/2010 14:23, Eli Bendersky wrote: Hello, I'm currently working, together with Terry Reedy, on improving the documentation o

Re: [Python-Dev] Python signal processing question

2010-07-19 Thread Michael Crute
t about the signal module that is a good complement to the C code for understanding how signals are handled in python. http://www.doughellmann.com/PyMOTW/signal/ HTH. -mike -- Michael E. Crute http://mike.crute.org It is a mistake to think you can s

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Michael Foord
files and paths confused enough already. That seems crazy to me and a switch on os.makedirs much more sensible. Michael Cheers, Nick. -- http://www.ironpythoninaction.com/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/m

Re: [Python-Dev] Python profiler and other tools

2010-07-25 Thread Michael Foord
://codespeak.net/svn/user/antocuni/hack/pdb.py Among its improvements it includes the ability to debug through generator frames, which pdb can't. It would be great to see some of these fixes folded back into the standard library version. All the best, Michael

Re: [Python-Dev] Thoughts fresh after EuroPython

2010-07-26 Thread Michael Foord
to in order to display it) using multiprocessing would have imposed a very big overhead due to serialization / deserialization (the program runs on windows). Using CPython would have made the program a lot slower due to the GIL. All the best, Michael -- http://www.ironpythoninaction.com/ http://

Re: [Python-Dev] Thoughts fresh after EuroPython

2010-07-26 Thread Michael Foord
;t be a huge amount of work to remove it. Presumably they would have to add locking in the right places - which would then impact performance. As PyPy doesn't use reference counting adding locking shouldn't impact performance as much as previous attempts with CP

Re: [Python-Dev] mkdir -p in python

2010-07-28 Thread Michael Foord
keshedding seems particularly pointless. http://mail.python.org/pipermail/python-dev/2010-July/102132.html All the best, Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to

Re: [Python-Dev] GIL musings (was Re: Thoughts fresh after EuroPython)

2010-07-28 Thread Michael Foord
Ironclad demonstrates that C extensions *can* be interfaced with a different garbage collection system whilst maintaining binary compatibility. It does impose constraints however (which is why the PyPy c-ext implementors chose source compatibility rather than binary compatibility). Michael Ch

Re: [Python-Dev] Compiling Free Cad on Rhel5

2010-07-28 Thread Michael Foord
/lists/ Having said that, it is common for Linux distributions to package the bits needed to compile Python separately from their distribution of Python itself (a horrible practise). You probably need to install the python-devel package using your package manager. All the best, Michael

Re: [Python-Dev] GIL musings (was Re: Thoughts fresh after EuroPython)

2010-07-28 Thread Michael Foord
On 28/07/2010 12:43, Ronald Oussoren wrote: On 28 Jul, 2010,at 12:56 PM, Michael Foord wrote: On 28/07/2010 11:50, Nick Coghlan wrote: > On Tue, Jul 27, 2010 at 12:33 AM, Ronald Oussoren > wrote: > >> In my opinion the GIL is a weak point of CPython and it would be nice

Re: [Python-Dev] Thoughts fresh after EuroPython

2010-07-28 Thread Michael Foord
e an issue. All the best, Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements

Re: [Python-Dev] Thoughts fresh after EuroPython

2010-07-28 Thread Michael Foord
l is accepted by the PSF board. Michael jesse ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidsp

Re: [Python-Dev] unexpected import behaviour

2010-07-29 Thread Michael Foord
behaviour (not a bug), but it frequently confuses even relatively experienced programmers (it can happen by accident and cause hard to track down bugs) and I personally think that Python would be improved by issuing a warning if a __main__ script reimports itself. All the best, Michael Foord

Re: [Python-Dev] Proposal: make float.__str__ identical to float__repr__ in Python 3.2

2010-07-29 Thread Michael Foord
3, 0.2, 0.14285714285714285] print(l[0], l[1], l[2]) 0. 0.2 0.142857142857 Any thoughts or comments on this? There's a working patch at http://bugs.python.org/issue9337 +1 Michael Mark ___ Python-Dev mailing

Re: [Python-Dev] Proposal: make float.__str__ identical tofloat__repr__ in Python 3.2

2010-07-29 Thread Michael Foord
ame floating point number. Mark did an excellent presentation on this at EuroPython and the slides are online: http://www.slideshare.net/dickinsm/magical-float-repr Michael Foord Robert Brewer fuman...@aminus.org ___ Python-Dev mailing list Python-Dev@p

[Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-29 Thread Michael Foord
Hello all, My apologies in advance if email mangles whitespace in the code examples. I can reformulate as a PEP if that is deemed useful and this document can be found online at: http://hg.python.org/unittest2/file/tip/description.txt (Please excuse errors and omissions - but do feel fre

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-29 Thread Michael Foord
ists.idyll.org/pipermail/testing-in-python/2010-March/002799.html On 29/07/2010 23:55, Michael Foord wrote: Hello all, My apologies in advance if email mangles whitespace in the code examples. I can reformulate as a PEP if that is deemed useful and this document can be found online at: http

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-30 Thread Michael Foord
On 30/07/2010 11:09, Tarek Ziadé wrote: On Fri, Jul 30, 2010 at 12:55 AM, Michael Foord wrote: ... The Plugin Class A sometimes-more-convenient way of creating plugins is to subclass the ``unittest2.events.Plugin`` class. By default subclassing ``Plugin`` will auto

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-30 Thread Michael Foord
For those of you who found this document perhaps just a little bit too long, I've written up a *much* shorter intro to the plugin system (including how to get the prototype) on my blog: http://www.voidspace.org.uk/python/weblog/arch_d7_2010_07_24.shtml#e1186 Michael On 29 July 2010

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-30 Thread Michael Foord
On 30/07/2010 15:04, Barry Warsaw wrote: On Jul 30, 2010, at 11:38 AM, Michael Foord wrote: I'm going to read your blog entry on the topic to evaluate it properly though: https://tarekziade.wordpress.com/2009/05/01/basic-plugin-system-using-abcs- and-the-extensions-package/

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-30 Thread Michael Foord
ry project). A configuration system is still good for this, but that kind of negates the advantage of discovery if the user still has to configure the plugin *anyway*. For framework authors not using the default test runner ("python -m unittest" or "unit2") this would be v

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-30 Thread Michael Foord
ugins our two systems are very different. I haven't read the existing proposals yet, If you want to help us this may be a good place to start... ;-) Michael but I just wanted to breathe a word of caution into this before it gets too far into interfaces and whatnot. I'll be glad to h

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-30 Thread Michael Foord
On 30/07/2010 16:28, Éric Araujo wrote: Le 30/07/2010 17:04, Michael Foord a écrit : There is no type checking or interface requirements in my plugin proposal for unittest. It is essentially an event based system. Event-based sounds good. unittest2 does have an interface IMO

Re: [Python-Dev] unexpected import behaviour

2010-07-30 Thread Michael Foord
*cause* of bugs, even for relatively experienced Python programmers (this exchange being another case in point). Michael By manipulating sys.path (or symlinks in the FS) one can import the same file as different modules as many times as [s]he wants. Should this be fixed for __main__? I doubt

Re: [Python-Dev] Is it intentional that "sys.__debug__ = 1" is illegal in Python 2.7?

2010-07-30 Thread Michael Foord
here then? http://docs.python.org/reference/lexical_analysis.html#identifiers And raise a DeprecationWarning one release before becoming invalid syntax? Michael -Barry ___ Python-Dev mailing list Python-Dev@python.org http://mail.pytho

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-30 Thread Michael Foord
On 30/07/2010 21:56, P.J. Eby wrote: At 03:34 PM 7/30/2010 +0100, Michael Foord wrote: Automatic discoverability, a-la setuptools entry points, is not without its problems though. Tarek outlines some of these in a more recent blog post: FWIW, it's not discovery that's the pr

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-31 Thread Michael Foord
On 31/07/2010 01:51, David Cournapeau wrote: On Fri, Jul 30, 2010 at 10:23 PM, Michael Foord wrote: For those of you who found this document perhaps just a little bit too long, I've written up a *much* shorter intro to the plugin system (including how to get the prototype) on my

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-31 Thread Michael Foord
On 31/07/2010 12:46, Michael Foord wrote: [snip...] If PEP 376 goes ahead then we could keep the user plugin I meant "keep the user config file". Michael and use the PEP 376 metadata, in concert with a user config file, to discover all plugins *available*. A plugins subcommand

Re: [Python-Dev] unexpected import behaviour

2010-07-31 Thread Michael Foord
lf by doing it *deliberately*. Glyf even recommends it as good practise. ;-) http://glyf.livejournal.com/60326.html So - the fix you suggest would *break* this code. Raising a warning wouldn't... (and would eventually make this workaround unnecessary.) Michael Cheers, Nick.

Re: [Python-Dev] unexpected import behaviour

2010-07-31 Thread Michael Foord
On 31/07/2010 16:30, Nick Coghlan wrote: On Sun, Aug 1, 2010 at 1:14 AM, Michael Foord wrote: Some people workaround the potential for bugs caused by __main__ reimporting itself by doing it *deliberately*. Glyf even recommends it as good practise. ;-) http://glyf.livejournal.com/60326

Re: [Python-Dev] proto-pep: plugin proposal (for unittest)

2010-07-31 Thread Michael Foord
On 31/07/2010 17:22, Tarek Ziadé wrote: On Sat, Jul 31, 2010 at 1:46 PM, Michael Foord wrote: ... Installation of plugins would still be done through the standard distutils(2) machinery. (Using PEP 376 would depend on distutils2. I would be fine with this.) Note that the PEP 376

<    1   2   3   4   5   6   7   8   9   10   >