Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-26 Thread Michael Foord
e *such* a bad idea - but you will still get caught out by this. A string read in text mode will read '\r\n' as '\n'. Setting this on a winforms component will still do the wrong thing. Better to be aware of the difference and use binary mode. Michael > -Original Me

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-29 Thread Michael Foord
nd practicality the former (IMO)... However, that would mean that round tripping a string would change it ('\r\n' would be written as '\r\n' and then read as '\n') - on the other hand (particularly given that we are treating the data as text and not a binary b

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-29 Thread Michael Foord
Terry Reedy wrote: > "Michael Foord" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > | Guido van Rossum wrote: > > [snip first part of nice summary of Python i/o model] > > | > The other translation deals with line endings. Upon input, any o

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-29 Thread Michael Foord
Steven Bethard wrote: > On 9/29/07, Michael Foord <[EMAIL PROTECTED]> wrote: > >> Terry Reedy wrote: >> >>> There are two normal ways for internal Python text to have \r\n: >>> 1. Read from a file with \r\r\n. Then \r\r\n is correct output (on

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-29 Thread Michael Foord
Steven Bethard wrote: > On 9/29/07, Michael Foord <[EMAIL PROTECTED]> wrote: > >> Steven Bethard wrote: >> >>> On 9/29/07, Michael Foord <[EMAIL PROTECTED]> wrote: >>> >>> >>>> Terry Reedy wrote: >>>>

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-09-30 Thread Michael Foord
[EMAIL PROTECTED] wrote: > Michael> Actually, I usually get these strings from Windows UI > Michael> components. A file containing '\r\n' is read in with '\r\n' > Michael> being translated to '\n'. New user input is added containing

Re: [Python-Dev] [python] Re: New lines, carriage returns, and Windows

2007-10-01 Thread Michael Foord
Steve Holden wrote: > Michael Foord wrote: > >> Steven Bethard wrote: >> >>> On 9/29/07, Michael Foord <[EMAIL PROTECTED]> wrote: >>> >>> >>>> Terry Reedy wrote: >>>> >>>> >

Re: [Python-Dev] Python developers are in demand

2007-10-20 Thread Michael Kent
Guido van Rossum python.org> writes: > I wonder if we should start maintaining a list of Python developers > for hire somewhere on python.org, beyond the existing Jobs page. Is > anyone interested in organizing this? I would be definitely interested in putting my name on such a list. __

Re: [Python-Dev] Python developers are in demand

2007-10-26 Thread michael macdonald
nger programmers who are using Python on their personal and open source projects get into positions of influence in the corporate world that will change. My thoughts, for what it's worth. Fight the good fight! Michael On Fri, 2007-10-26 at 04:28 +0200, [EMAIL PROTECTED] wrote: >

Re: [Python-Dev] [python] Should we do away with unbound methods in Py3k?

2007-11-21 Thread Michael Foord
calls (via the unbound method) > may go a little faster. Also, it would make it easier to fix this > issue: http://bugs.python.org/issue1109 > On occasions I've found it a drag that you *can't* call unbound methods with a different type.

Re: [Python-Dev] [poll] New name for __builtins__

2007-11-28 Thread Michael Foord
__root__ but I'm still > open for better suggestions. > +1 for '__root_namespace__' (explicit) +0.5 for '__root__' Michael Foord > Christian > ___ > Python-Dev mailing list > Python-Dev@python.org > ht

Re: [Python-Dev] [python] Re: removing the new and types modules

2007-11-28 Thread Michael Foord
f type(obj) == type(1.0)". > if isinstance(obj, float) or if type(obj) is float I often use FunctionType though.So long as it moves rather than vanishes... Michael http://www.manning.com/foord > Luckily Python does not distinguish float and double like other languages > - othe

[Python-Dev] New Standard Library Module

2007-12-05 Thread Michael Foord
Hello all, Can I suggest a new module for the standard library: 'antigravity.py'. Perhaps it could display a particular image on import... Michael http://www.manning.com/foord ___ Python-Dev mailing list Python-Dev@python.org http://mail.

Re: [Python-Dev] Syntax suggestion for imports

2008-01-02 Thread Michael Urman
during the lifetime of late 2.x, helps swing me back the other way. -- Michael Urman ___ 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/archive%40mail-archive.com

Re: [Python-Dev] [python] Re: pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-07 Thread Michael Foord
be updated to offer > the option of installing to this directory? What about python setup.py > install (add a --user flag, for example)? > The installers should give the user the choice at install time (preferably). A '--user' flag would also be useful (IMHO). Michael Foord &g

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-09 Thread Michael Foord
in your Documents folder right now. Go ahead. Look. Do you see any files or folders in there that you personally did not create? If so, you've been victimized. Applications should never create or modify anything in your documents folder without your permission. {snip...] If application

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-09 Thread Michael Foord
Paul Moore wrote: > On 09/01/2008, Michael Foord <[EMAIL PROTECTED]> wrote: > >> Note today's Coding Horror blog entry: "Don't Pollute User Space" >> >> http://www.codinghorror.com/blog/archives/001032.html >> >&g

Re: [Python-Dev] [python] Re: PEP: per user site-packages directory

2008-01-12 Thread Michael Foord
m for Windows than other platforms? This would be a really useful feature for me and it would be a shame for it not to be on by default on Windows (and another set of complexities for setuptools I suspect). Michael Foord > > For security reasons we also need it disabled when the getuid() !

Re: [Python-Dev] [python] Re: PEP 370, open questions

2008-01-17 Thread Michael Foord
> > > I can't comment on the matter. I've not used roaming user profiles on > Windows for more than five years. Can someone with more experience shed > some like on the matter? > Roaming profiles still load and save the p

Re: [Python-Dev] [python] Re: PEP: per user site-packages directory

2008-01-21 Thread Michael Foord
o take seriously >> if we are interested in increasing take-up. >> > > setuptools and easy_install won't be included in Python 2.6 and 3.0: > http://www.python.org/dev/peps/pep-0365/ > Which is a shame. I agree with Steve on this - although I realise that Phillip is bas

Re: [Python-Dev] [python] Re: trunc()

2008-01-24 Thread Michael Foord
too much, so it needs a > deprecation warning in 3.0. > > int has to be a builtin because it's a fundamental type. trunc() > followed round() into the builtins. I have no opinion on whether ceil > and floor should move there; it probably depends on how often they'r

Re: [Python-Dev] [python] trunc()

2008-01-24 Thread Michael Foord
a thin wrapper around libm. > > So the question stands, why is trunc() different? Can anything > good come from having trunc() and int() in the same namespace? > If the ambiguity is that 'int' behaviour is unspecified for floats - is it naive to suggest we specify the be

Re: [Python-Dev] [python] TIOBE Programming Community Index

2008-01-26 Thread Michael Foord
y widely reported - and in fact is on the front page of Python.org! A site with a more interesting range of metrics (in my opinion) is 'langpop': http://www.langpop.com/ In its 'Normalized Comparison' it shows Python doing well, but not *quite* having

Re: [Python-Dev] [python] Re: [Python-checkins] r60283 - in python/trunk: Include/longintrepr.h Include/longobject.h Include/unicodeobject.h Misc/NEWS Modules/_fileio.c Objects/longobject.c Objects/un

2008-01-26 Thread Michael Foord
s not going to disturb the balance between > str/bytes/unicode. > I'm looking forward to having a native mutable bytes type in Python 2.x. Michael Foord ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/

Re: [Python-Dev] trunc()

2008-01-27 Thread Michael Urman
ting integers from other numeric types), would separating parsing from the int (and float) constructors also solve this? Is the aim to "clean up" the following fake example? (Real world uses of map(int, ...) seem almost uniformly related to string parsing.) >>> map(i

Re: [Python-Dev] [python] Re: functions vs methods (was Re: trunc())

2008-01-28 Thread Michael Foord
useful in other languages. ;-) Michael Foord ___ 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%40voidspace.org.uk -- http

[Python-Dev] Downloads Page

2008-02-24 Thread Michael Foord
Hello all, The downloads page on python.org shows 2.5.1 as the latest release: http://python.org/download/ Michael ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] [Python-3000] Python 2.6 and 3.0

2008-02-25 Thread Michael Foord
sy but special and uncommon > stuff really hard. > We build all our installers at Resolver Systems using Wix - dynamically generating parts of the templates and doing all sorts of weird and wonderful stuff (creating shortcuts, setting registry entries, testing dependencies, co

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-03-19 Thread Michael Urman
means the change saves nothing, and costs plenty. Note the acronym is OOWTDI, not OONTDI - using a different name does not necessarily make it a different way. -- Michael Urman ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mai

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-03-19 Thread Michael Foord
object (and vice versa for assertFalse) For migration a simple subclass of TestCase that provides the old methods/semantics is trivial to write. No need for monkey-patching. Michael Foord > Its also interesting to note the original commit message: > > >> r34209 | purcell | 2003-0

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-03-19 Thread Michael Urman
asional "misuse")? But I'm not the one offering a patch here, so I'll pipe down now. :) -- Michael Urman ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mai

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-03-19 Thread Michael Foord
t; >> > [snip] > >> Could these be removed for 3k? >> >> > > I agree with others who say that we shouldn't do this for Python 3k. > If we want to get rid of them, we should deprecate them, wait a > release or so, *then* remove them. > &

Re: [Python-Dev] [Distutils] Capsule Summary of Some Packaging/Deployment Technology Concerns

2008-03-20 Thread Alexander Michael
On Wed, Mar 19, 2008 at 6:15 PM, Jeff Rush <[EMAIL PROTECTED]> wrote: > Frankly I'd like to see setuptools exploded, with those parts of general use > folded back into the standard library, the creation of a set of > non-implementation-specific documents of the distribution formats and > behavi

Re: [Python-Dev] [Distutils] How we can get rid of eggs for 2.6 and beyond

2008-03-24 Thread Alexander Michael
On Fri, Mar 21, 2008 at 9:31 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > The objections to the PEP remain the same as they were then, > though: In the requirements, it says "we need", without saying > why we need. It then goes on saying "we want" (rephrased) > "to duplicate APT and RPM",

Re: [Python-Dev] [Distutils] How we can get rid of eggs for 2.6 and beyond

2008-03-24 Thread Alexander Michael
On Sat, Mar 22, 2008 at 10:02 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > It seems to me that this discussion is being undermined by not > > acknowledging the many use cases up front. There is no rationale > > because there are too many tacit rationales. > > I honestly, really, cannot i

Re: [Python-Dev] [Python-3000] the release gods are angry at python

2008-03-27 Thread Michael Foord
oing out to external servers and should be more reliable. Michael > >> - >> http://www.python.org/dev/buildbot/all/S-390%20Debian%20trunk/builds/255/step-test/0 >> > > Unfortunately, this log has no information about why the test is > failing, and

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-04-08 Thread Michael Foord
l tests should use > the operator their name implies, e.g. assertEqual(x, y) should do > something like > > if x == y: > pass > else: > raise AssertionError(...) > > rather than > > if x != y: > raise AssertionError(...) > &

Re: [Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

2008-04-09 Thread Alexander Michael
On Wed, Apr 9, 2008 at 3:40 PM, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > That is indeed a problem -- but it's a social one, not a technical > one. It's trivial for the publisher of an egg to change their > command line from "setup.py bdist_egg upload" to "setup.py sdist > bdist_egg upload",

Re: [Python-Dev] Reserving an arg space for Jython

2008-04-11 Thread Michael Foord
;> .NET, but maybe they would like one? >> > -X was suggested on Jython's irc. I kind of like -J, but -X would > work for us too. > IronPython has a host of -X:Something command line switches - so reserving -X would be helpful. Michael Foord > -Frank > __

Re: [Python-Dev] Global Python Sprint Weekends: May 10th-11th and June 21st-22nd.

2008-04-16 Thread Michael Foord
I should be able to help organise and attend the London contribution. Personally I'd like to work on the documentation changes / clean-up for the unittest module discussed recently. Michael Foord ___ Python-Dev mailing list Python-Dev@py

[Python-Dev] Proposed unittest changes

2008-04-17 Thread Michael Foord
lists and tuples that are the same length show the members (and indices?) that were different. I've copied Steve Purcell into this email, but his comments on issue 2578 indicate that he is happy for 'us' to make changes and he no longer has a string sense of "ownership" of t

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Michael Foord
sages for assertEquals and assertNotEquals when an explicit message is passed in * Improved message when comparing lists/tuples with assertEquals * The additional asserts that I suggested (In/NotIn, RaisesWithMessage, Is/NotIs) I think that there is still work I can do on the docs even before any

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Michael Foord
Christian Heimes wrote: > Michael Foord schrieb: > >> By etc I assume you mean: >> >> assertLessThan >> assertGreaterThan >> assertLessThanOrEquals >> assertGreaterThanOrEquals >> >> Would not variants be useful as well

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Michael Foord
Jesse Noller wrote: > On Thu, Apr 17, 2008 at 10:59 AM, Michael Foord > <[EMAIL PROTECTED]> wrote: > >> Guido van Rossum wrote: >> > I'm worried that a mass renaming would do anything but inconvenience >> > users during the already stressful 2->

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Michael Foord
Terry Reedy wrote: > "Michael Foord" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > | I think that there is still work I can do on the docs even before any > | grand renaming... > > In a related thread, I proposed and Guido approved that th

Re: [Python-Dev] unscriptable?

2008-04-18 Thread Michael Foord
about this: > > >>> set([1,2,3])[0] > Traceback (most recent call last): >File "", line 1, in > TypeError: 'set' object is unindexable > > I tend to agree with Benjamin that "unsubscriptable" is a made-up word, >

Re: [Python-Dev] Encoding detection in the standard library?

2008-04-21 Thread Michael Foord
rmine the > encoding of a chunk of text 100% of the time mitigates against it. > The only approach I know of is a heuristic based approach. e.g. http://www.voidspace.org.uk/python/articles/guessing_encoding.shtml (Which was 'borrowed' from d

Re: [Python-Dev] Proposed unittest changes

2008-04-25 Thread Michael Foord
Neal Norwitz wrote: [Michael working on cleaning up the unittest module] it seems like most of the good ideas have been captured already. I'll through two more (low priority) ideas out there. 1) Randomized test runner/option that runs tests in a random order (like regrtest.py -r, bu

Re: [Python-Dev] [Doc-SIG] Double specification of function signatures?

2008-04-27 Thread Michael Foord
eaks to check in besides these. It seems that any documentation or help tool worth its salt should fetch the parameters from the definition and so including them in the docstring should be redundant duplication. Michael Foord Thx, Skip ___ Doc-

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-04 Thread Michael Foord
breaking that expectation breaks my flow of code reading. I very *rarely* use lambdas in the form you show, but where you do I prefer them to the single line function. Michael Foord The difference in the result (the only one I know of) is that the code and function objects get the generic

Re: [Python-Dev] Invitation to try out open source code review tool

2008-05-06 Thread Alexander Michael
On Tue, May 6, 2008 at 1:26 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Tue, May 6, 2008 at 12:51 AM, Jeroen Ruigrok van der Werven > <[EMAIL PROTECTED]> wrote: > > -On [20080505 05:38], Guido van Rossum ([EMAIL PROTECTED]) wrote: > > > http://code.google.com/p/rietveld/source/browse

Re: [Python-Dev] [Python-3000] [Python-checkins] r62848 - python/trunk/Objects/setobject.c

2008-05-08 Thread Michael Urman
needing modifications if they contain direct svn url references. -- Michael Urman ___ 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/archive%40mail-archive.com

Re: [Python-Dev] rename of ConfigParser module?

2008-05-15 Thread Alexander Michael
On Thu, May 15, 2008 at 7:37 AM, Mark Hammond <[EMAIL PROTECTED]> wrote: > Trying to build pywin32 from the trunk, I see: > > from distutils.config import PyPIRCCommand > File "C:\src\python-svn\lib\distutils\config.py", line 8, in > from ConfigParser import ConfigParser > ImportError: No module

Re: [Python-Dev] Issue 643841: Including a new-style proxy base class in 2.6/3.0

2008-05-20 Thread Michael Foord
itself. I've needed to do this a few times when wrapping libraries. Michael Foord With classic classes, this is trivial, since __getattr__ is always consulted, even for retrieval of special methods. With new-style classes, however, the __getattribute__ machinery can be bypassed, meaning the

Re: [Python-Dev] Addition of "pyprocessing" module to standard lib.

2008-05-21 Thread Michael Foord
orm X". And what about platforms like the JVM or CLR? Incidentally there were a small but vocal group of Pythonistas who were (are?) certain that IronPython is not Python because it doesn't have [all of...] the C extensions. Michael Foord Skip

Re: [Python-Dev] Addition of "pyprocessing" module to standard lib.

2008-05-21 Thread Michael Foord
James Y Knight wrote: On May 21, 2008, at 11:26 AM, Michael Foord wrote: And what about platforms like the JVM or CLR? Incidentally there were a small but vocal group of Pythonistas who were (are?) certain that IronPython is not Python because it doesn't have [all of...] the C exten

Re: [Python-Dev] Addition of "pyprocessing" module to standard lib.

2008-05-21 Thread Michael Foord
[EMAIL PROTECTED] wrote: Skip> Maybe the presence of a functioning ctypes (can|might|should|will) Skip> become the operational definition of "Python runs on platform X". Michael> And what about platforms like the JVM or CLR? Sorry, allow me to rephrase: Mayb

Re: [Python-Dev] Issue 643841: Including a new-style proxy base class in 2.6/3.0

2008-05-28 Thread Michael Foord
. To have a proxy where: proxy_instance += 1 unwraps the proxy is really no good! (At least not for my use cases...) Michael Foord -- http://www.ironpythoninaction.com/ http://www.theotherdelia.co.uk/ http://www.voidspace.org.uk/ http://www.ironpython.info/ http://www.resolverhacks.net

Re: [Python-Dev] PEP 371 Discussion (pyProcessing Module)

2008-05-29 Thread Michael Foord
some code duplication with other parts of the standard library may still remain in 2.6/3.0). +1 from me as well. I think multiple-processes is over played as a concurrency solution in Python (where you need to marshal lots of data in and out, the overheads of multiple processes can be very expens

Re: [Python-Dev] Iterable String Redux (aka String ABC)

2008-05-30 Thread Michael Foord
class? >>> class X(object): ... def __unicode__(self): ... return 'fish' ... __str__ = __repr__ = __unicode__ ... >>> x = X() >>> open(x) Traceback (most recent call last): File "", line 1, in TypeError: coercing to Unicode: nee

Re: [Python-Dev] converting the stdlib to str.format

2008-06-04 Thread Michael Foord
ting with %s and a single object or a tuple meets >90% of my string formatting needs. Michael Foord Cheers, Nick. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.or

Re: [Python-Dev] converting the stdlib to str.format

2008-06-05 Thread Michael Foord
over. But that either needs doing for 3.0 or waiting until 4.0 right? Personally I only *occasionally* find the tuple interpolation a problem and am perfectly happy with the current % string formatting... Michael Foord Cheers, Nick. ___ Pytho

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Michael Foord
it that assignment to None is disallowed and the naming of members called None being invalid syntax is merely an artefact of the implementation of this, or does Python require this... Michael Foord In a similar fashion: class Parrot(object): ... pass ... p = Parrot() p.

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Michael Foord
m but the DLR 'catches' attribute look ups etc to add Python methods to basic types and do 'other magic' like wrapping Python functions as delegates). This at least enshrines the current IronPython behaviour with the veneer of respectability. Michael Foord Alex On Mo

Re: [Python-Dev] [Python-3000] Betas today - I hope

2008-06-12 Thread Michael Foord
illip J Eby but can't find a reference easily). The last one I wrote was to proxy CPython objects from IronPython via Python.NET... I would prefer it if the proxy class wrapped the return values of inplace operations. Michael Foord I've pushed as hard as I'm personally willin

Re: [Python-Dev] [Python-3000] Betas today - I hope

2008-06-13 Thread Michael Foord
illip J Eby but can't find a reference easily). The last one I wrote was to proxy CPython objects from IronPython via Python.NET... I would prefer it if the proxy class wrapped the return values of inplace operations. Michael Foord I've pushed as hard as I'm personally willin

[Python-Dev] Python FAQ: Why doesn't Python have a "with" statement?

2008-06-13 Thread Michael Foord
y probably needs at least clarifying now that Python does have a 'with' statement. Michael Foord -- http://www.ironpythoninaction.com/ http://www.theotherdelia.co.uk/ http://www.voidspace.org.uk/ http://www.ironpython.info/ http://www.resolverhacks.net/

Re: [Python-Dev] Proposal: add odict to collections

2008-06-14 Thread Michael Foord
performance of a Python implementation is not that great. I'm +1 - but this proposal has been made many times before and people always argue about what features are needed or desirable. :-( Michael Foord To fight that problem I want to proposed a new class in "collections&quo

[Python-Dev] Suggested API change to PyOS_InputHook

2008-06-23 Thread Michael Abbott
I have a problem with the PyOS_InputHook() API as implemented by Modules/readline.c: there is no way to communicate any interruption seen while waiting at the keyboard back to the process actually reading the line. I have solved this in my own application by creating a new module which reimple

Re: [Python-Dev] Suggested API change to PyOS_InputHook

2008-06-23 Thread Michael Abbott
On Mon, 23 Jun 2008, Aahz wrote: > Then don't bother posting code to the list. Please post a patch; up to > you whether you send a notice to python-dev. Very well. Issue 3180 created. I hope I'm doing it right... ___ Python-Dev mailing list Python-D

[Python-Dev] Python Windows Installers

2008-06-24 Thread Michael Foord
Hello all, I'm just doing some housekeeping on a Windows install, and notice that the 'Publisher' of my Python 2.4 and 2.5 installs is shown as "Martin v. Lowis". Whilst I *personally* find this very reassuring I wonder if this is intended / ideal? All

Re: [Python-Dev] Python Windows Installers

2008-06-24 Thread Michael Foord
Michael Foord wrote: Hello all, I'm just doing some housekeeping on a Windows install, and notice that the 'Publisher' of my Python 2.4 and 2.5 installs is shown as "Martin v. Lowis". Whilst I *personally* find this very reassuring I wonder if this is intended /

Re: [Python-Dev] Python Windows Installers

2008-06-24 Thread Michael Foord
y case, bug #1737210 complained about it, and I changed it to "Python Software Foundation". I can't retroactively change it for the releases you are looking at. No problem. I was more concerned about future releases. All the best, Michael Foord Regards, Martin -

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-07-13 Thread Michael Foord
is supposed to behave for it to be considered successful, not the conditions under which its behaviour constitutes a failure. Agreed. I tend to think of testing as action followed by assertion - I do this and this should have happened. Your tests usually define 'expected behaviour

Re: [Python-Dev] PEP 8 conformance of unittest

2008-07-13 Thread Michael Foord
tely my writing commitment is going to keep me occupied until August - after which it will be one of my highest priorities. Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/ http://www.trypython.org/ http://www.ironpython.info/ http://www.theotherdelia.co.uk/ h

Re: [Python-Dev] Proposed unittest changes

2008-07-13 Thread Michael Foord
Ben Finney wrote: Howdy Michael, I'm interested in the changes you're proposing for Python's 'unittest' module. I am (like, I suspect, many Python coders) maintaining my own set of extensions to the module across many projects, so I'd really like to see many o

Re: [Python-Dev] Proposed unittest changes

2008-07-14 Thread Michael Foord
Raymond Hettinger wrote: Michael Foord <[EMAIL PROTECTED]> writes: The full list of changes proposed (feel free to start - but ping me or the list) and not shot down was something like: […] Thanks. I'm working these into another draft PEP that I hope to have up in a day or two.

Re: [Python-Dev] PEP: Consolidating names and classes in the `unittest` module

2008-07-14 Thread Michael Foord
ess' names, the consensus in the *last* discussion was that the 'assert*' names were to be preferred. I protest the removal of the assert names - and in the absence of likely consensus (and barring a dictat of course) I suggest this part of the proposal b

Re: [Python-Dev] Proposed unittest changes

2008-07-14 Thread Michael Foord
ts which nose does seem to provide very well although I haven't used it yet. Michael Almost anyone who has used py.test can attest its syntax is much more natural, easy to learn, easy to both read and write, and is much lighter weight. I think some variant of py.test could be done that is c

Re: [Python-Dev] Proposed unittest changes

2008-07-14 Thread Michael Foord
"magic", my apologies. But in the absence of magic how do you propose to provide a meaningful error message from the failure of: assert a == b To wrap it in a function like "assert equals(a, b)" seems to gain little over unittest. Michael I wrote a recipe (somewhat rou

Re: [Python-Dev] PEP: Consolidating names and classes in the `unittest` module

2008-07-14 Thread Michael Foord
Benjamin Peterson wrote: On Mon, Jul 14, 2008 at 6:18 PM, Ben Finney <[EMAIL PROTECTED]> wrote: "Benjamin Peterson" <[EMAIL PROTECTED]> writes: On Mon, Jul 14, 2008 at 8:25 AM, Ben Finney <[EMAIL PROTECTED]> wrote: Use new-style classes throughout --

Re: [Python-Dev] PEP: Consolidating names and classes in the `unittest`module (updated 2008-07-15)

2008-07-14 Thread Michael Foord
nse" for more information. >>> import unittest >>> type(unittest.TestCase) >>> It seems like a risky change for zero-benefit. Looks like that part of the PEP is unnecessary. Michael Raymond ___ Python-Dev ma

Re: [Python-Dev] Proposed unittest changes

2008-07-14 Thread Michael Foord
vel attributes just for the duration of the test. As we're changing more of our tests over to use these we're finding it reduces the volume and complexity of our test code. Michael Foord [1] Based on http://code.google.com/p/mock/ although there is some outstandi

Re: [Python-Dev] PEP: Consolidating names in the `unittest` module

2008-07-15 Thread Michael Foord
s 2to3 fixer needed? Michael Collin Winter ___ 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%40voidspace.org.uk -

Re: [Python-Dev] PEP: Consolidating names in the `unittest` module

2008-07-16 Thread Michael Foord
seem to be an argument in favor of making it follow the Python style guidelines. Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/ http://www.trypython.org/ http://www.ironpython.info/ http://www.theotherdelia.co.uk/ http://www.resolverhacks.net/ __

Re: [Python-Dev] PEP: Consolidating names in the `unittest` module

2008-07-16 Thread Michael Foord
Terry Reedy wrote: Michael Foord wrote: Collin Winter wrote: Is any provision being made for a 2to3 fixer/otherwise-automated transition for the changes you propose here? As the deprecation is intended for 2.X and 3.X - is 2to3 fixer needed? A fixer will only be needed when it

Re: [Python-Dev] PEP: Frequently-requested additional features for the `unittest` module

2008-07-16 Thread Michael Foord
I've used tests like that when implementing numeric objects, which has been several times - but only a tiny proportion of the tests I've written. I wouldn't be sorry not to include them. Michael -Brett ___ Python-Dev mailing list Python

Re: [Python-Dev] PEP: Consolidating names in the `unittest` module

2008-07-16 Thread Michael Foord
ls into the tested application rather than just the unit test class method calls if you're not careful. Do you have production code methods called 'assertEquals' and the like? It sounds pretty unlikely to me. Michael +1. I had just groped my way to that

Re: [Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)

2008-07-16 Thread Michael Foord
to live with the aliases. At best we can discourage the undesirables by documenting them out of existence. Presumably new methods should *not* follow PEP8 but be internally consistent with the existing API? Does this mean that new methods should be added with *both* asse

Re: [Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)

2008-07-16 Thread Michael Foord
Raymond Hettinger wrote: From: "Michael Foord" <[EMAIL PROTECTED]> I assume this doesn't rule out the addition of [some of..] the new convenience test methods? In Kent Beck's book on Test Driven Development, he complains that most unittest implementations spawned f

Re: [Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)

2008-07-16 Thread Michael Foord
icism comes in for. Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/ http://www.trypython.org/ http://www.ironpython.info/ http://www.theotherdelia.co.uk/ http://www.resolverhacks.net/ ___ Python-Dev mailing list Pytho

Re: [Python-Dev] Unittest PEP do's and don'ts (BDFL pronouncement)

2008-07-16 Thread Michael Foord
or py.test. What about if you could run all tests in a project (of the first kind) with: tests = unittest.discover_tests('path/', filter='*test.py') unittest.run_tests(tests) (or even just the first line). With 'discover_tests' recursively globbing the

Re: [Python-Dev] String concatenation

2008-08-03 Thread Michael Foord
://www.python.org/dev/peps/pep-3126/ Michael Foord Regards, Stavros Korokithakis ___ 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/fuzzy

Re: [Python-Dev] the explicit self

2008-08-27 Thread Michael Foord
x27;s an example that does this here: http://www.voidspace.org.uk/python/articles/metaclasses.shtml#the-selfless-metaclass Michael Cheers, fijal On Wed, Aug 27, 2008 at 8:46 AM, Kilian Klimek <[EMAIL PROTECTED]> wrote: Hello, i know this has been discusses very much, i'm sorry,

Re: [Python-Dev] confusing exec error message in 3.0

2008-08-27 Thread Michael Foord
ource code file, honouring encoding cookies, the tokenize module has a 'detect_encoding' function that could be useful. Michael Georg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsu

[Python-Dev] Documentation Error for __hash__

2008-08-28 Thread Michael Foord
ct.__reversed__ Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/ http://www.trypython.org/ http://www.ironpython.info/ http://www.theotherdelia.co.uk/ http://www.resolverhacks.net/ ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] Documentation Error for __hash__

2008-08-29 Thread Michael Foord
M.-A. Lemburg wrote: On 2008-08-28 21:31, Michael Foord wrote: Hello all, The documentation for __hash__ seems to be outdated. I'm happy to submit a patch, so long as I am not misunderstanding something. http://docs.python.org/dev/reference/datamodel.html#object.__hash__ The document

Re: [Python-Dev] Bug in SimpleHTTPRequestHandler.send_head?

2008-09-05 Thread Michael Foord
Hello Kim, Thanks for your post. The source code control used for Python is Subversion. Patches submitted to this list will unfortunately get lost. Please post the bug report along with your comments and patch to the Python bug tracker: http://bugs.python.org/ Michael Foord Kim Gräsman

Re: [Python-Dev] What this code should do?

2008-09-19 Thread Michael Foord
after the except block) and in the second the NameError is caught by the finally that does re-raise. What do you think should happen? Michael or shall I fill the bug? (the reason to ask is because a) django is relying on this b) pypy implements it differently) cheers,

Re: [Python-Dev] Status of MS Windows CE port

2008-09-25 Thread Michael Foord
pt to get the patch-set accepted into trunk but it was rejected because it required too *many* changes. Michael Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

<    7   8   9   10   11   12   13   14   15   16   >