Re: [Python-Dev] Time for a change of random number generator?

2016-02-12 Thread Robert Kern
in PCG and Random123 too ;-) Quite so! -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco __

Re: [Python-Dev] Time for a change of random number generator?

2016-02-11 Thread Robert Kern
?) relevant dimensions. http://xorshift.di.unimi.it/ I'm favorable to the PCG family these days, though xorshift* and Random123 are reasonable alternatives. http://www.pcg-random.org/ https://www.deshawresearch.com/resources_random123.html -- Robert Kern "I have come to be

Re: [Python-Dev] pep8 reasoning

2014-04-24 Thread Robert Kern
, and it isn't really germane to Chris' historical question. I mention it only because I had just run across this paper last night, so it was fresh in my mind when you mentioned studies on the subject. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-09 Thread Robert Kern
it was written, and I personally witnessed all of the history myself so I don't need it repeated back to me. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-07 Thread Robert Kern
) not a pointer to PyObject? Typo, I'm fairly certain. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] python 3 niggle: None 1 raises TypeError

2014-02-18 Thread Robert Kern
identical objects as equal. http://hg.python.org/cpython/file/79e5bb0d9b8e/Objects/object.c#l716 -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto

Re: [Python-Dev] potential argparse problem: bad mix of parse_known_args and prefix matching

2013-11-26 Thread Robert Kern
--no-verbose --etc This is a common idiom across many argument processors. parse_known_args() is not a good solution for this situation even if you mitigate the prefix issue. Exact matches of --options are still possible. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Python-Dev] Clean way in python to test for None, empty, scalar, and list/ndarray? A prayer to the gods of Python

2013-06-14 Thread Robert Kern
=float64) [~] |5 np.empty([3,4,0])[1] array([], shape=(4, 0), dtype=float64) [~] |6 len(np.empty([3,4,0])) 3 -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Python-Dev] Clean way in python to test for None, empty, scalar, and list/ndarray? A prayer to the gods of Python

2013-06-14 Thread Robert Kern
for emptiness not knowing if it is an array or some other sequence). What people usually want from bool(some_array) is either some_array.all() or some_array.any(). In the face of this ambiguity, numpy refuses the temptation to guess and raises an exception explaining matters. -- Robert Kern I have

Re: [Python-Dev] Clean way in python to test for None, empty, scalar, and list/ndarray? A prayer to the gods of Python

2013-06-14 Thread Robert Kern
On 2013-06-14 23:31, Robert Kern wrote: On 2013-06-14 21:55, R. David Murray wrote: On Fri, 14 Jun 2013 21:12:00 +0200, Martin Schultz masch...@gmail.com wrote: 2. Testing for empty lists or empty ndarrays: In principle, `len(x) == 0` will do the trick. **BUT** there are several caveats

Re: [Python-Dev] __subclasses__() return order

2013-05-25 Thread Robert Kern
predictable. I have never seen __subclasses__ actually used in production code, so I'm wondering whether someone might be affected by such a change. I do use a package that does use __subclasses__ in production code, but the order is unimportant. -- Robert Kern I have come to believe

Re: [Python-Dev] Semantics of __int__(), __index__()

2013-04-03 Thread Robert Kern
subclasses of float. We don't. [~] |1 type(float(np.float64(1.0))) float [~] |2 type(int(np.int32(1))) int -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Python-Dev] VC++ 2008 Express Edition now locked away?

2013-03-06 Thread Robert Kern
permission to redistribute it. If the agreements that you have with the copyright owner do not mention redistribution, you do not have permission to redistribute it. IANAL, TINLA. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: [Python-Dev] PEP czar for PEP 3144?

2012-02-21 Thread Robert Kern
administrations and continues today. http://en.wikipedia.org/wiki/List_of_U.S._executive_branch_%27czars%27 -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Python-Dev] requirements for moving __import__ over to importlib?

2012-02-09 Thread Robert Kern
. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] readd u'' literal support in 3.3?

2011-12-08 Thread Robert Kern
using 90+. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Python-Dev mailing list

Re: [Python-Dev] Not-a-Number

2011-04-29 Thread Robert Kern
On 4/29/11 1:35 AM, Nick Coghlan wrote: On Fri, Apr 29, 2011 at 3:28 PM, Steven D'Apranost...@pearwood.info wrote: Robert Kern wrote: Actually, Python treats all NaNs as quiet NaNs and never signalling NaNs. Sorry, did I get that backwards? I thought it was signalling NANs that cause

Re: [Python-Dev] Not-a-Number

2011-04-29 Thread Robert Kern
On Fri, Apr 29, 2011 at 11:35, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Fri, Apr 29, 2011 at 11:31 AM, Robert Kern robert.k...@gmail.com wrote: .. And in fact, 0.0/0.0 is covered by the more general rule that x/0.0 raises ZeroDivisionError, not a rule that converts IEEE

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-28 Thread Robert Kern
they subclass Python float and complex, respectively. 2. Have all np.float* and np.complex* scalars follow the Python float semantics. 3. Keep the current IEEE-754 semantics for all float scalar types. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-28 Thread Robert Kern
are not a way to avoid NaNs arising from computations. NaN handling is an important part of computing with numpy. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Python-Dev] the role of assert in the standard library ?

2011-04-28 Thread Robert Kern
for the reason that Guido states. Some bugs only show up under -O, so you ought to be running your test suite under -O, too. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-28 Thread Robert Kern
contexts. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Python-Dev mailing list Python

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-28 Thread Robert Kern
their guess as to the general rule from that. But your point stands, numpy arrays cannot be members of sets or keys of dicts or orderable/in-able elements of lists. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad

Re: [Python-Dev] Not-a-Number

2011-04-28 Thread Robert Kern
anyone. Actually, Python treats all NaNs as quiet NaNs and never signalling NaNs. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Robert Kern
, not a bool, so we can't do containment tests for lists of arrays), so NaN is pretty easy to explain afterward. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Robert Kern
us for the two double values. Since there is no concept of identity for this case, there is no cognate behavior of Python to match. [~] |10 b = np.array([1.0, 2.0, nan], dtype=float) [~] |11 b == nan array([False, False, False], dtype=bool) [~] |12 nan in b False -- Robert Kern I have come

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Robert Kern
nonetheless. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Python-Dev mailing list

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Robert Kern
to computational NaNs as you would expect any application that does that many flops to be. [1] Okay, that's a lie. I'm sure that persistent minority would *love* to have NaN == NaN, because that would make their (ab)use of NaNs easier to work with. -- Robert Kern I have come to believe

Re: [Python-Dev] public visibility of python-dev decisions before it's too late (was: PyCObject_AsVoidPtr removed from python 3.2 - is this documented?)

2011-03-15 Thread Robert Kern
#L299 -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-12 Thread Robert Kern
, opt.logLevel) or level = logging._levelNames[opt.logLevel] -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-12 Thread Robert Kern
-generate UIs (e.g. the help text for a --log-level argument or a radio box widget in a GUI). Having separate mappings makes them easier to work with than the 2.6-style _levelNames mapping. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-08 Thread Robert Kern
and application users. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Python-Dev mailing list

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-08 Thread Robert Kern
don't disagree. Please drop and shouldn't be required to think about it from my statements. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-07 Thread Robert Kern
. This is only my personal anecdotal experience, but the current behavior has always wasted my time and never saved any of my time. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-07 Thread Robert Kern
On 12/7/10 4:59 PM, Robert Kern wrote: On 12/7/10 2:26 PM, Vinay Sajip wrote: This issue was brought to my notice today: http://bugs.python.org/issue10626 and reference was made in the comments to possible obstacles facing stdlib maintainers who might wish to use logging in the stdlib

Re: [Python-Dev] Using logging in the stdlib and its unit tests

2010-12-07 Thread Robert Kern
think that boilerplate should be minimized. If using getLogger() should almost always be followed by adding a NullHandler, then it should be the default behavior. The easiest way to achieve this effect is to simply not issue the warning message. -- Robert Kern I have come to believe

Re: [Python-Dev] __setcall__

2010-10-26 Thread Robert Kern
to emulate does. It looks like it is building up a list of values, not defining a function. If you take your question over to python-list, I can explain more. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Python-Dev] We should be using a tool for code reviews

2010-09-29 Thread Robert Kern
/ directory. My mercurial checkout happens to be slower, but I don't know whose fault that is. I'm still using Mercurial 1.5.1 on my OS X box, and while I wasn't doing much that would take up CPU or bandwidth, I wasn't trying especially hard to prevent such interference, either. -- Robert

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

2010-07-07 Thread Robert Kern
docstring extraction features in contrast with other such tools. It doesn't generate a manual from the docstrings; it makes you explicitly reference the docstrings into the manual's text. This would fit in very naturally with Python's library reference. -- Robert Kern I have come to believe

Re: [Python-Dev] what to do if you don't want your module in Debian

2010-04-26 Thread Robert Kern
/shared/ subdirectory. Writing portable libraries (with portable setup.py files!) is difficult to do that way, though. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Python-Dev] Why is nan != nan?

2010-03-29 Thread Robert Kern
nothing is still on the table, I think. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] Why is nan != nan?

2010-03-27 Thread Robert Kern
will be. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Why is nan != nan?

2010-03-27 Thread Robert Kern
.__contains__() and other such methods. They do not, and should not, know about isnan(). -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] Decimal - float comparisons in py3k.

2010-03-18 Thread Robert Kern
incorrect for most use cases. Fuzzy comparisons are sometimes useful for equality testing, but almost never for ordering. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Python-Dev] argparse ugliness

2010-03-09 Thread Robert Kern
On Tue, Mar 9, 2010 at 11:31, R. David Murray rdmur...@bitdance.com wrote: On Mon, 08 Mar 2010 15:35:46 -0600, Robert Kern robert.k...@gmail.com wrote: On 2010-03-08 15:20 PM, Greg Ewing wrote: Mark Russell wrote: Boolean flags are a common enough case that I'd be inclined to add a wrapper

Re: [Python-Dev] argparse ugliness

2010-03-08 Thread Robert Kern
(): http://code.google.com/p/argparse/issues/detail?id=62 -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-11 Thread Robert Kern
also could use setUpClass/setUpModule. It would be a waste (and honestly kind of ridiculous) to force people to use a whole new framework (which would duplicate unittest in almost its entirety) for want of those two methods. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-11 Thread Robert Kern
implicit in my opinions to just about anything I say, if you wish. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] setUpClass and setUpModule in unittest

2010-02-09 Thread Robert Kern
of tests). nosetests allows you to write such module-level and class-level setup and teardown functions. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Python-Dev] Modules that run other scripts

2009-11-14 Thread Robert Kern
: http://bitbucket.org/ned/coveragepy/src/tip/coverage/execfile.py -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] PyPI comments and ratings, *really*?

2009-11-13 Thread Robert Kern
to implement these mechanisms with the care and attention that they need. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] PyPI comments and ratings, *really*?

2009-11-12 Thread Robert Kern
of the poll to propagate through Twitter, blogs, etc. You should also make an announcement on python-announce. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Python-Dev] decimal.py: == and != comparisons involving NaNs

2009-11-08 Thread Robert Kern
: It is a common expectation, but a false one. __eq__ and __ne__ are explicitly allowed to return anything, not just bools. http://www.python.org/dev/peps/pep-0207/ -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad

Re: [Python-Dev] Refactoring installation schemes

2009-11-05 Thread Robert Kern
projects don't really assign work. If you want to help, help. Don't wait for someone to tell you exactly what to do. No one will. Go to the tracker, find something interesting, and do it. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: [Python-Dev] Backport new float repr to Python 2.7?

2009-10-11 Thread Robert Kern
which give different doctest results on different platforms. Using a consistent routine would actually improve the ability to use doctests in that one regard. It certainly would make writing examples much more consistent, particularly for those of us that use infs and nans frequently. -- Robert

Re: [Python-Dev] PEP 389: argparse - new command line parsing module

2009-10-03 Thread Robert Kern
, as mentioned earlier, was for debugging your parser on the interactive prompt. A custom subclass may also be able to hold more machine-readable information about the error than the formatted error message, but I don't have any particular use cases about what may be the most useful. -- Robert Kern I

Re: [Python-Dev] PEP 389: argparse - new command line parsing module

2009-09-30 Thread Robert Kern
that print to stdout/stderr, and they appear to work fine. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] PEP 389: argparse - new command line parsing module

2009-09-30 Thread Robert Kern
-methods.html#sub-commands -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Python-Dev mailing list

Re: [Python-Dev] PEP 389: argparse - new command line parsing module

2009-09-30 Thread Robert Kern
in the _SubparsersAction class. You can register a new class for it: parser.register('action', 'parsers', MySubParsersAction) -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though

Re: [Python-Dev] PEP 389: argparse - new command line parsing module

2009-09-28 Thread Robert Kern
this role for optparse. It might be straightforward to port it to argparse. http://cfgparse.sourceforge.net/ -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Python-Dev] deleting setdefaultencoding iin site.py is evil

2009-08-25 Thread Robert Kern
of the function than the current situation. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] deleting setdefaultencoding iin site.py is evil

2009-08-25 Thread Robert Kern
() when I read your message and thought that you were proposing to move it to sys. Never mind me. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Python-Dev] Update to Python Documentation Website Request

2009-07-25 Thread Robert Kern
? The official code location is Lib/distutils within the standard library. He said docutils, not distutils. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Python-Dev] Indentation oddness...

2009-06-01 Thread Robert Kern
On 2009-05-30 21:02, Greg Ewing wrote: Robert Kern wrote: The 'single' mode, which is used for the REPL, is a bit different than 'exec', which is used for modules. This difference lets you insert blank lines of whitespace into a function definition without exiting the definition. All

Re: [Python-Dev] syntax warnings don't go through warnings.warn?

2009-06-01 Thread Robert Kern
): ... print 'xx', args ... warnings.warn_explicit = mywarn_explicit compile(def f():\n a = 1\n global a\n, , exec) xx (name 'a' is assigned to before global declaration, type 'exceptions.SyntaxWarning', '', 3, None, None) code object module at 0x39e9f8, file , line 1 -- Robert Kern I have

Re: [Python-Dev] Indentation oddness...

2009-05-29 Thread Robert Kern
the definition. Ending with a truly empty line does not cause the IndentationError, so the REPL can successfully compile the code, signaling that the user has finished typing the function. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: [Python-Dev] Easy way to detect filesystem case-sensitivity?

2009-05-07 Thread Robert Kern
boolean somewhere. One would have to query the target directory for this information. I am not aware of the existence of code that does such a query, though. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Python-Dev] Issue5434: datetime.monthdelta

2009-04-17 Thread Robert Kern
an instant user base. From there, if it is found to be useful it could make the leap to be part of the datetime module. dateutil.relativedelta appears to do everything monthdelta does and more in a general way. Adding monthdelta to dateutil doesn't seem to make much sense. -- Robert Kern I

Re: [Python-Dev] Issue5434: datetime.monthdelta

2009-04-16 Thread Robert Kern
import datetime datetime(2009, 1, 15) + dt datetime.datetime(2009, 2, 15, 0, 0) datetime(2009, 1, 31) + dt datetime.datetime(2009, 2, 28, 0, 0) dt.months 1 datetime(2009, 1, 31) + relativedelta(years=-1) datetime.datetime(2008, 1, 31, 0, 0) -- Robert Kern I have come to believe that the whole

Re: [Python-Dev] Issue5434: datetime.monthdelta

2009-04-16 Thread Robert Kern
than you were hoping. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Python-Dev mailing

Re: [Python-Dev] bdb.py trace C implementation?

2009-04-01 Thread Robert Kern
and stepping through the code manually, the performance is not all that important. However, up until that breakpoint, you are running a lot of code in bulk. It would be useful to have a performant trace function that interferes with that code the least. -- Robert Kern I have come to believe

Re: [Python-Dev] pprint(iterator)

2009-02-02 Thread Robert Kern
(sys.modules) 10 loops, best of 3: 39.9 ms per loop In [13]: len(sys.modules) Out[13]: 517 The comparison is somewhat dodgy, though. pretty is not so much a refactoring of pprint as a reimplementation, so the time differences may not be due to the dispatch. -- Robert Kern I have come to believe

Re: [Python-Dev] pprint(iterator)

2009-01-29 Thread Robert Kern
Ronacher's pretty.py for a starting point. http://dev.pocoo.org/hg/sandbox/file/tip/pretty I've been using it as my default displayhook under IPython for a few weeks now. It uses a combination of a function registry and a __pretty__ special method to find the right pretty printer. -- Robert Kern I

Re: [Python-Dev] Matrix product

2008-08-01 Thread Robert Kern
object. I don't think there are many scientists/engineers/whatnot who want to double the number of operators to learn or who care if the matmult operator works on lists of lists or anything else in the standard library. -- Robert Kern I have come to believe that the whole world is an enigma

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

2008-07-16 Thread Robert Kern
test_nicefail(): x = 12 E assert x == 10 assert 12 == 10 [/Users/rkern/test_nicefail.py:3] __ tests finished: 1 failed in 0.09 seconds -- Robert Kern I have come to believe that the whole

Re: [Python-Dev] configure error: rm: conftest.dSYM: is a directory

2008-04-07 Thread Robert Kern
. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Error in PEP3118?

2008-01-23 Thread Robert Kern
(product of the elements of the shape array), the amendment is incorrect. For a shape array like {4*5*6}, the number of bytes is (4*5*6)*bytes_per_item, not 3*bytes_per_item. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our

Re: [Python-Dev] C Decimal - is there any interest?

2007-10-16 Thread Robert Kern
have no tools in numpy or scipy for decimal arithmetic. The focus of numpy is arrays. This decimal module is complementary to numpy and vice versa. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret

Re: [Python-Dev] Product function patch [issue 1093]

2007-09-04 Thread Robert Kern
could easily allay that. http://projects.scipy.org/mailman/listinfo/numpy-discussion -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] Product function patch [issue 1093]

2007-09-04 Thread Robert Kern
Guido van Rossum wrote: On 9/4/07, Robert Kern [EMAIL PROTECTED] wrote: The 3.x compatibility break (however alleviated by 2to3) makes a nice clean cutoff. The numpy that works on Pythons 3.x would essentially be a port from the current numpy. Consequently, we could modify the numpy

Re: [Python-Dev] The docs, reloaded

2007-05-20 Thread Robert Kern
, we'll provide the manpower ourselves. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] Pydoc Improvements / Rewrite

2007-01-06 Thread Robert Kern
introspecters have priorities ranging from 20 to 30. The default priority (10) will place new introspecters before standard introspecters. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-29 Thread Robert Kern
mechanism, I think it is insufficient. I doubt it can express all the concepts that ctypes supports. What do you think is missing that can't be added? -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Python-Dev] External Package Maintenance (was Re: Please stopchanging wsgiref on the trunk)

2006-06-12 Thread Robert Kern
are moving towards distributing a smallish bootstrap distribution and provide most of the packages as eggs. Upgrades should then be an easy_install away. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret

Re: [Python-Dev] Pre-PEP: Allow Empty Subscript List Without Parentheses

2006-06-10 Thread Robert Kern
. The upshot is that numpy no longer creates rank-zero arrays unless if the user really asks for one. The remaining use cases are documented here: http://projects.scipy.org/scipy/numpy/wiki/ZeroRankArray -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Python-Dev] a note in random.shuffle.__doc__ ...

2006-06-10 Thread Robert Kern
algorithm considered an implementation detail? It certainly was when the module migrated from Wichmann-Hill to the Mersenne Twister. OTGH, I don't foresee the random module ever using an algorithm with worse characteristics than the Mersenne Twister. -- Robert Kern I have come to believe that the whole

Re: [Python-Dev] I'm not getting email from SF when assigned abug/patch

2006-03-30 Thread Robert Kern
://mail.python.org/mailman/options/python-dev/python-python-dev%40m.gmane.org -- Robert Kern [EMAIL PROTECTED] I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Python-Dev] I'm not getting email from SF when assigned abug/patch

2006-03-30 Thread Robert Kern
tracker. FWIW: Trac has a Sourceforge bug tracker import script: http://projects.edgewall.com/trac/browser/trunk/contrib/sourceforge2trac.py Apologies: for the other blank reply. -- Robert Kern [EMAIL PROTECTED] I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Python-Dev] Problems with the Python Memory Manager

2005-11-16 Thread Robert Kern
. -- Robert Kern [EMAIL PROTECTED] In the fields of hell where the grass grows high Are the graves of dreams allowed to die. -- Richard Harter ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Python 3 design principles

2005-08-31 Thread Robert Kern
the Python developers to use that opportunity to the fullest advantage to make a better language. [1] By which I mean the sum total of the code that I use not just code that I've personally written. I am a library-whore. -- Robert Kern [EMAIL PROTECTED] In the fields of hell where the grass grows high

[Python-Dev] Re: Ye don't be needin' these!

2005-03-23 Thread Robert Kern
argument ((x**y) % z), which is necessary for really large numbers like the ones you play with in cryptography. -- Robert Kern [EMAIL PROTECTED] In the fields of hell where the grass grows high Are the graves of dreams allowed to die. -- Richard Harter