o automatic
> tracking/untracking based on contents would use some other
> new API (which would be non-public in 2.7.x).
>
Where would the extra state information be stored? (to distinguish untracked
and untracked-and-keep-it-that-way)
--
Daniel Stutzbach, Ph.D.
President, S
out the base revision for the patch.
How about the opposite approach: make a Python-specific version of upload.py
that lets the user attach the patch to an issue with an optional message?
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com/>
_
ed service and then runs hooks. Obviously, it would not be
possible to write hooks that reject changesets, but it would be possible to
write hooks that send email or notify buildbots.
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http
index
tuple, range, and str types all register as following the Sequence ABC.
list and bytearray types register as following the MutableSequence ABC,
which is a subclass of the Sequence ABC.
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterp
ast tolerate ;) ) additional review of
their code.
The hard part is encouraging contributors to find the time and motivation to
thoroughly review code that they aren't personally interested in (and
perhaps not even familiar with).
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enter
7;s review/patch ratio? (in
descending order)
Obviously there would be many non-trivial details to work out. I'm just
brainstorming.
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com/>
___
Pyt
On Sat, Oct 2, 2010 at 3:55 PM, "Martin v. Löwis" wrote:
> I'll have to come up with a better way to determine the branch
> which a patch was created on.
>
That would also be helpful for those of us using DVCS software to talk to
the svn server. :-)
--
Daniel St
en Wensleydale.
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com/>
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailma
On Thu, Oct 14, 2010 at 12:38 PM, barry.warsaw
wrote:
> -# Generated by GNU Autoconf 2.65 for python 3.2.
> +# Generated by GNU Autoconf 2.67 for python 3.2.
>
Was the change in autoconf versions intentional and/or is it a problem?
--
Daniel Stutzbach, Ph.D.
President, Stutzbach En
2010/10/27 Kristján Valur Jónsson
> Svn.python.org already plays host to some other, less official, projects
> such as stackless, so why not this?
>
What are the benefits of hosting such a project on svn.python.org instead of
somewhere else? (such as GitHub or BitBucket)
--
Daniel
ercurial, so svnmerge would not be helpful for
much longer. On the plus side, since Mercurial is a Distributed Version
Control System, if you setup an unofficial continuation of Python 2 on the
host of your choice, it will be easy for you to pull patches from py3k.
--
Daniel Stutzbach, Ph.D.
Presiden
d by .read().
[4]:
http://www.google.com/codesearch?hl=en&sa=N&q=BufferedIOBase++lang:python&ct=rr&cs_r=lang:python
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pyt
Do you have an old unicodeobject.h somehow?
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
kup. That way
> the code remains the same no matter if the dict has changed or not.
>
I have had similar ideas in the past but have never found time to explore
them. The same mechanism could also be used to speed up attribute access on
objects.
--
Daniel Stutzbach
==
> --- python/branches/py3k/Doc/whatsnew/3.2.rst (original)
> +++ python/branches/py3k/Doc/whatsnew/3.2.rst Mon Jan 10 22:26:49 2011
> @@ -553,7 +553,7 @@
> >>> range(0, 100, 2)[0:5]
> range(0, 10, 2)
>
> - (Contributed by Daniel Stutzback in
-fwrapv -O3 -Wall
> -Wstrict-prototypes' ./python -E ./setup.py build
> make: *** [sharedmods] Error 139
Does that version of gcc emit any warnings during compilation?
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
On Fri, Feb 11, 2011 at 8:06 AM, Guido van Rossum wrote:
>
> And finally remember that asyncore is the most monkey-patched module
> in the world. :-)
I propose that in Python 3.3 we rename asyncore to barrel_of_monkeys.
--
Daniel
On Fri, Feb 11, 2011 at 10:36 AM, Antoine Pitrou wrote:
> Daniel Stutzbach wrote:
> > I propose that in Python 3.3 we rename asyncore to barrel_of_monkeys.
>
> Would that be a Mapping or a Sequence?
Before or after monkey-patching? :-)
--
D
cussion before PyCon 2009, but not much came of it:
http://mail.python.org/pipermail/python-dev/2009-March/086678.html
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
ht
u have the skills and experience so that designing a async API is not
as hard for you, please run with it. :-) Personally, I would love to see
asyncore deprecated in favor of something better.
--
Daniel Stutzbach
___
Python-Dev mailing list
Python-Dev@p
of "trunk" altogether? It's history is a strict subset
of the 2.7 branch's history, isn't it?
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe
On Sat, Feb 26, 2011 at 8:44 AM, Antoine Pitrou wrote:
> Le samedi 26 février 2011 à 08:38 -0800, Daniel Stutzbach a écrit :
> > Can we just get rid of "trunk" altogether? It's history is a strict
> > subset of the 2.7 branch's history, isn't it?
>
&g
ng (similar to Bazaar), bookmarks (similar to git), and named branches.
So a named branch can contain more than one branch.
Were there reasons for going with named branches over bookmarks? PEP 385
discusses only cloning and named branches. I'm just curious, not trying
ver" are a matter of perspective.
I spent some time on Friday setting up hg-git on my workstation and making a
few test commits. It took me awhile to figure out how to get everything
working, but it seems to work smoothly now. At some point I'll update
http://wiki.python.org/moin/Git
that name. So you can't create
> > two disconnected subgraphs whose nodes have the same branch
> > name.
>
> That's not completely correct. You *can* do that.
>
Can we create a hook on the server to reject changesets like that?
--
Daniel Stutzbach
concern is that people may create named branches locally
> as part of their own workflow, then mistakenly push those branches
> instead of collapsing back to a single commit against the relevant
> line of development.
>
+1
--
Daniel Stutzbach
__
that
> shouldn't be tracked.
>
If the goal is to prevent something from being committed, shouldn't the
check go in a pre-commit hook instead?
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mail
if they have addressed your earlier
comments or not.
You can also just tweak a few things and push the changes back to them.
They can easily merge your changes with any changes they've made in the
meantime (which is hard to do if you're push
o it in hg. I know it's easy in
git; I assume it's easy in hg. I did some searching but was unable to come
up with the right incantation.
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
http://mail.python.o
ental-branch
git diff master...experimental-branch
The idea is to pull their remote branch but not merge it, which will create
multiple heads locally. Then find the common ancestor of my regular local
head and the new head, and diff the ancestor with the new head.
by the integer
biglist.sort(key=lambda s: s.split(',')[0]) # Sort by the shortstring
I think the use cases are pretty narrow where there's plenty of memory for
storing the list but not enough to store two copies.
--
Daniel Stutzbach
_
(q
for p, q in fractions)**2' 'sorted(fractions, key=lambda t:
t[0]*max_denominator_sq//t[1])'
100 loops, best of 3: 3.73 msec per loop
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
The equivalent way to how we had been using svnmerge would be to use hg
transplant to move patches between branches (and never merging the
branches).
Conversely, the current hg workflow would be similar to committing changes
to the earliest applicable svn branch, then doing a full svnmerge to lat
me?
>
People love it because it's a very powerful tool. People hate it because it
allows you to shoot yourself in the foot.
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
hile ago I came across the following nice
tool that puts these intermediate commits in a side branch (that can later
be abandoned) so they never show up in the main history:
https://github.com/bartman/git-wip
I imagine something similar could be written for hg.
--
Daniel Stutzbach
---
> + math.gamma(alpha) * beta ** alpha
> +
> """
>
> # alpha > 0, beta > 0, mean is alpha*beta, variance is
> alpha*beta**2
>
> --
> Re
analogous to adding a func argument to sum(),
which would give it all of the power of reduce().
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.or
On Sun, Mar 27, 2011 at 10:53 PM, Nick Coghlan wrote:
> On Mon, Mar 28, 2011 at 2:11 PM, Daniel Stutzbach
> wrote:
> > Is there a good use-case for the func argument?
>
> The examples that Raymond gives in the docs (cumulative
> multiplication, running min/max, cash fl
an accumulate tool which takes arbitrary
> functions.
>
Thanks. I had not been thinking along numeric lines. I can see how these
would be useful for working with matrices, vectors, and similar constructs.
--
Daniel Stutzbach
___
Python-Dev mailing
peak at
the file to see if it starts with one of the ZIP magic numbers?
That way it Just Works.
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman
-conquer algorithm,
too, except it's the bad kind that breaks the input into pieces of
size O(1) and size O(n) instead of pieces of size O(n/2). :-)
(where n is number of digits)
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
__
orithm can be found at the link below (search for "Radix
conversion"):
http://people.cis.ksu.edu/~rhowell/calculator/comparison.html
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
___
Python-Dev mailing list
Python-De
On 10/19/07, Facundo Batista <[EMAIL PROTECTED]> wrote:
> 2007/10/16, Daniel Stutzbach <[EMAIL PROTECTED]>:
> > I agree. A basic subquadratic radix conversion algorithm isn't much
> > more complex than the existing quadratic code. I just whipped
> > togeth
2, 3, 4}, max_len = 4, len = 3, start = 1}
>>> x.append(5)
{obs = {5, 2, 3, 4}, max_len = 4, len = 4, start = 1}
>>> x.popleft()
{obs = {5, NULL, 3, 4}, max_len = 4, len = 3, start = 2}
>>> x.pop()
{obs = {NULL, NULL, 3, 4}, max_len = 4, len = 2, start = 2}
Comments? Though
iming tons of test
> cases, arguing the merits of alternate approaches, and ending-up
> with substantially the same functionality that we already have.
I respect that. I won't waste either of our time, then.
Cheers,
--
Daniel Stutzbach, Ph.D. Preside
oop to get an overflow.
I think 64 bits is pretty safe :-)
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
htt
computed. There is never a need to compute extra digits just to
perform the test.
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python
ng a precedent that _all_ slots should return a PyObject?
Consider the following third behavior:
>>> class foo(object):
... def __len__(self):
... return 'foo'
...
>>> x = foo()
>>> len(x)
Traceback (most recent call last):
File &qu
whether both deserve to be a built-in, as
well provide a starting point for 3.0 best practices.
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mai
s/math-module functions?
x.trunc() is just as clear as trunc(x), and doesn't require a builtin.
The syntax when used on float literals is ugly ("2.56 .round()"), but
there's no use case for these methods on literals (just write "3").
2to3 could handle this conversion p
he variable could plausibly be both a
number or something else? (a Google Code search for "def trunc(self)"
lang:python returns 1 hit)
How does the that additional value weigh against the cost of adding
another builtin and trying to explain trunc() versus int() to new
users?
example to help users rewrite their code to work with 3.0.
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http
;m not sure about the effects on the CPU cache.
So, like I said, a robustness versus performance trade-off. :-(
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
___
Python-Dev mailing list
[email protected]
http://mail.python.o
in odd places. For
example, the documentation for deque describes the complexity of some
of the list type's operations.
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
___
Python-Dev mailing list
[email protected]
very basic one at
http://wiki.python.org/moin/TimeComplexity?action=show
I'm not that familiar with the Wiki syntax, so the tables are kind of
ugly at the moment.
I wasn't sure about many of the set() operations, so I didn't include those.
--
Daniel Stutzbach, Ph.D. Pr
re is a reason that PyDict_DelItem never calls dictresize?
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://
the time complexity of specific operations.
http://en.wikipedia.org/wiki/Amortized_analysis
--
Daniel Stutzbach, Ph.D.President, Stutzbach Enterprises LLC
___
Python-Dev mailing list
[email protected]
http://mail.python.
variant of mergesort, with some neat ideas to
make the best-case O(n).
I just made the word "Sort" into a hyperlink, pointing to the link
that Duncan Booth pointed out in another response.
--
Daniel Stutzbach, Ph.D. Presid
d use the Unix epoch:
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.gmtime(0)
(1970, 1, 1, 0, 0,
drop it, or make it convert the exponent to upper case
>
> What exponent? Isn't the point of 'f' formatting that there is no exponent?
There's no exponent for small-magnitude numbers, but still an exponent
for large-magnitude numbers:
>>> &
than
((a*b)*c)*d).
(please forgive typos--writing this on a smartphone)
--
Daniel Stutzbach
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python
to detect
that self->x is bogus.
Generally, I end up storing all the objects to be Py_DECREF'd in temporary
variables and doing the Py_DECREF's just before returning. That way, "self"
is never in an inconsistent state.
--
Daniel Stutzbach, Ph.D.
consistent state.
If in your code you frequently need to modifying just one property, you are
certainly free to create your own macro. :-)
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
___
Python-De
c per loop
Cashew:~/src-other/Python-2.6-pristine$ ./python.exe Lib/timeit.py -s
'import datetime' -s 'x = tuple(datetime.datetime.now() for x in
range(5000))' 'max(x)'
1000 loops, best of 3: 600 usec per loop
Cashew:/tmp/Python-2.6$ ./python.exe
out that opcode X is often
followed by opcode Y).
compute next_handler
jmp next_handler ; executed only once
handler1:
; do stuff
compute next_handler
jmp next_handler
handler2:
; do stuff
compute next_handler
jmp next_handler
--
Daniel Stutzbach, Ph
fy a program to run after the stack trace has been printed
#3 combined with #5 would be very useful for automated bug reporting.
For what it's worth, the functionality could be implemented under Windows
using Structured Exception Handling.
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Ent
rs to previous discussion on the matter
> or simple arguments why this would not apply to the Python reference
> counting mechanism.
>
Adam Olsen actually tried it. See:
http://mail.python.org/pipermail/python-dev/2007-September/074645.html
Other message in that thread describe the pr
http://msdn.microsoft.com/en-us/library/ms861162.aspx
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/lis
new users don't learn features
slated for possible removal.
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailm
On Thu, Jan 8, 2009 at 10:33 AM, Aahz wrote:
> On Wed, Jan 07, 2009, Daniel Stutzbach wrote:
> > After reading "What's New in Python 2.6" and then upgrading, I quickly
> > noticed an omission: string exceptions are no longer supported and raise
> a
> >
types that
might have different widths on different platforms? e.g.:
uid_t uid = PyNumber_AS_INT_BY_SIZE(number_ob, uid_t);
That way, the core does not need to know about every blah_t type used by
POSIX and extension modules, while offering convenient conversion functions
nonetheless.
--
some slightly more complex examples, that could not be rewritten by
altering the "in" clause?
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
___
Python-Dev mailing list
[email protected]
don't you can make a convincing
argument on performance.
Also, you know the latter is actually fewer characters, right? :-)
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
___
Python-Dev mailing
is available on p.stdout, use the select module
(unless you're on Windows).
The child process has to flush its output buffer for this to work, but that
isn't Python's problem.
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Ente
lthough that is a
common misconception). If a program never blocks, then it uses 100% of CPU
by definition, which is undesirable. ;-) A program just needs select() so
it knows which file descriptors it can call os.read() or os.write() on
without blocking.
--
Daniel Stutzbach, Ph.D.
President,
On Tue, Jan 27, 2009 at 4:44 PM, Antoine Pitrou wrote:
> Now here are some performance figures. Text I/O is done in utf-8 with
> universal
> newlines enabled:
>
Would it be much trouble to also compare performance with Python 2.6?
--
Daniel Stutzbach, Ph.D.
President, Stutzbach
On Tue, Jan 27, 2009 at 4:54 PM, Antoine Pitrou wrote:
> Daniel Stutzbach stutzbachenterprises.com> writes:
> > Would it be much trouble to also compare performance with Python 2.6?
>
> Here are the results on trunk.
>
Thanks, Antoine! To make comparison easier, I put
On Tue, Jan 27, 2009 at 5:44 PM, Antoine Pitrou wrote:
> Daniel Stutzbach stutzbachenterprises.com> writes:
> > That's because in Python 3, the Text IO has to convert to Unicode,
> correct?
>
> Yes, exactly.
>
What kind of input are you using for the Text tests? I
MB/s. That's at least vaguely in
the same ballpark.
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pyt
On Wed, Jan 28, 2009 at 1:42 PM, Adam Olsen wrote:
> It'd also help if the file repr gave the encoding:
>
+1
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
___
Python-Dev mailin
n
> embedded in the interpreter itself, while it hasn't.
>
The meaning which numpy attributes to Ellipsis is also the meaning that
mathematical notation has attached to Ellipsis for a very long time.
See: http://en.wikipedia.org/wiki/Ellipsis#In_mathematical_notation
--
D
in
context, whereas:
split_comma = partial(str.split, ..., ',')
to me looks like "make ',' the last argument" rather than "make ',' the
second argument".
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com&
101 - 182 of 182 matches
Mail list logo