On 2008-01-25, Steven Bethard wrote:
> On Jan 25, 2008 12:18 AM, Mark Summerfield <[EMAIL PROTECTED]> wrote:
> > On 2008-01-25, Guido van Rossum wrote:
> > > For the record, I'm thinking Raymond has won this argument fair and
> > > square, and I'm withd
n set
{1, 2} # 2 item frozen set
{:} # empty dict
{1:1} # 1 item dict
{1:1, 2:2} # 2 item dict
--
Mark Summerfield, Qtrac Ltd., www.qtrac.eu
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailma
_(self, other))
return cls
The reason for the ugly hasattr() calls is that object itself defines
the comparison operators (in Python 3.0a2).
--
Mark Summerfield, Qtrac Ltd., www.qtrac.eu
___
Python-3000 mailing list
Python-3000@python.org
http://mail.py
On 2007-12-14, Christian Heimes wrote:
> Mark Summerfield wrote:
> > Hi,
> >
> > I was wondering if it is yet known what the right way to open text files
> > in P3K will be?
> >
> > According to the docs the signature for open() is:
> >
> >
ified) and bytes if "b" is present?
Or will the signature change to match the one provided by codecs?
codecs.open(filename, mode[, encoding[, errors[, buffering]]])
using the logic described above regarding mode?
Or some other way?
Thanks!
--
Mark Summerfield, Qtra
line
398, in __init__
self.add_page(name)
File "/home/mark/opt/python30a2/lib/python3.0/idlelib/tabbedpages.py", line
413, in add_page
self._tab_set.add_tab(page_name)
File "/home/mark/opt/python30a2/lib/python3.0/idlelib/tabbedpages.py", line
76, in add_tab
se
On 2007-11-30, Guido van Rossum wrote:
> On Nov 30, 2007 8:08 AM, Mark Summerfield <[EMAIL PROTECTED]> wrote:
> > Your reply seems to imply that Python 3 will have 3 different and
> > overlapping ways of formatting strings: %, str.format(), and
> > string.Template. If
On 2007-11-30, Eric Smith wrote:
> Mark Summerfield wrote:
> > Hi,
> >
> > I'm using Python 30a.
> >
> > The docs for str.format()'s 'g' format say
> > "General format. This prints the number as a fixed-point number,
> &g
ent is
greater than -4 or less than precision, decimal format otherwise."
There is no "decimal format", but there is "Signed integer decimal"
format which is what seems to being used.
So is this a doc bug?
BTW I notice that deci
is possible to do so.
I'll write myself a class decorator that can create the "missing"
comparisons using logical equivalences.
Thanks!
> -jJ
>
> On 11/16/07, Mark Summerfield <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm trying to understan
=>. Bear in mind that
for class Eq I only defined ==, Python 3 created != for me; similarly
for class Lt I defined < and Python created >. Or is my code for LtEq
wrong?
I know it isn't a problem creating a class decorator or metaclass to
"complete" LtEq; I'm just tryi
On 2007-10-26, Guido van Rossum wrote:
> 2007/10/26, Oleg Broytmann <[EMAIL PROTECTED]>:
> > On Fri, Oct 26, 2007 at 09:48:28AM -0400, Chris Monson wrote:
>
> [quoting Mark Summerfield]
>
> > > 'd' - Decimal Integer. Outputs the number in b
I think
re.replace() is better and more consistent regarding the rest of the
library.
And as for subn, well, replacen or substituten are possible, but why not
have just one method and have an optional keyword argument if a tuple is
wanted?
--
Ma
{'C\u0327': 2, '\xc7': 1}
>>> for k, v in d.items():
... print(k, v)
...
Ç 2
Ç 1
I think this is surprising.
>>> s = {c1, c2}
>>> s
{'C\u0327', '\xc7'}
>>> for x in s:
... pri
On 2007-09-26, Guido van Rossum wrote:
> On 9/26/07, Mark Summerfield <[EMAIL PROTECTED]> wrote:
> > On 2007-09-26, [EMAIL PROTECTED] wrote:
> > > Mark> I have put a new version (incorporating another
> > > implementation Mark> idea from Paul Hank
rted data structures are used far more frequently than the unsorted
versions.
If you primarily program in Python, using dict + sorted() is very
natural because they are built into the language. But using a sorted
data structure and never sorting is a very common practice in other
On 2007-09-26, Mike Klaas wrote:
> On 25-Sep-07, at 2:01 PM, Mark Summerfield wrote:
> > On 2007-09-25, Guido wrote:
> >> For that to happen, someone has to write a production-quality
> >> implementation, release it as a separate 3rd party module for a
> >> whil
On 2007-09-25, you wrote:
> On 9/25/07, Mark Summerfield <[EMAIL PROTECTED]> wrote:
> > My proposal was for the sorteddict to be put in the collections module,
> > not as a builtin. One of the things I particularly like about Python is
> > that the core language is smal
On 2007-09-25, Guido van Rossum wrote:
> On 9/25/07, Mark Summerfield <[EMAIL PROTECTED]> wrote:
> > I can understand your personal preference for dict, although mine is for
> > sorteddict---but IMO Python should provide both since both are
> > legitimate in appropriate
omp.lang.python with subject:
sorteddict PEP proposal [started off as orderedict]
If there is a positive response I will submit it to the PEP editors. If
there is not, I will just hope that someone else will pick up the idea,
even if in another form or with a different API, because I'
. I'm
happy to do that (at least for a sorteddict), but if someone who has
done PEPs before did so, I'd be just as happy---I'll see what the
feedback is (if any) when I get online again next week.
PS And no, I've never programmed in PHP and never fancied doing so:-)
--
Mar
On 2007-09-14, Adam Olsen wrote:
> On 9/14/07, Mark Summerfield <[EMAIL PROTECTED]> wrote:
> > On 2007-09-14, Nicko van Someren wrote:
> > > On 11 Sep 2007, at 15:06, Mark Summerfield wrote:
> > > > Is there any chance that an ordered dict will be
On 2007-09-14, Nicko van Someren wrote:
> On 11 Sep 2007, at 15:06, Mark Summerfield wrote:
> > Is there any chance that an ordered dict will be added to Python 3's
> > library?
>
> It would make sense, since one of the primary justifications for the
> new metaclass
also pure Python).
I would suppose that it would be better if it was implemented in C---for
example, my own pure Python ordered dict takes about eight times as long
to load in 18,000 items compared with loading the same into a dict.
--
Mark Summerfield, Qtrac Ltd., ww
ing though?
-- Forwarded Message --
Subject: Re: [Python-3000] abc docs
Date: 2007-09-05
From: Mark Summerfield <[EMAIL PROTECTED]>
To: python-3000@python.org
[snip]
BTW When I tried a variation of one of the ABC examples from the PEP I
got this:
Python 3.0a1 (py3k, Sep
26 (Red Hat 4.1.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from abc import ABCMeta
>>> class MyABC(metaclass=ABCMeta): pass
...
>>> MyABC.register(tuple)
>&
26 matches
Mail list logo