...
>
> I'm not an English native speaker so I don't know whether "break in" is
> acceptable English in this context or can only mean "to get into a building
> by force".
>
> Kiuhnm
> _______
> P
implementations, one for documentation and
one for efficiency. How different would this be from all those modules that
have both Python and C implementations?
On 17 July 2017 at 09:31, Antoine Pitrou wrote:
>
> Le 17/07/2017 à 15:26, Isaac Morland a écrit :
> >
> > I think I unde
On 17 July 2017 at 08:43, Antoine Pitrou wrote:
>
> Hello,
>
> Cost of creating a namedtuple has been identified as a contributor to
> Python startup time. Not only Python core and the stdlib, but any
> third-party library creating namedtuple classes (there are many of
> them). An issue was cre
taneous conversion into a
bytes object for the purpose of writing to the OS.
Isaac Morland CSCF Web Guru
DC 2619, x36650 WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/l
our effort substantially, it is not
worthwhile. Python is great for lots of applications already - there is
no need to force it into unsuitable problem domains.
Isaac Morland CSCF Web Guru
DC 2619, x36650 WWW Software Specialist
__
nbreakable. Of course in order for
this to be possible, there first has to be a formal semantics for Python.
Has anybody made a formal semantics for Python? If not, then this project
is missing a pretty important pre-requisite.
Isaac Morland CSCF Web Guru
DC 2619, x36
On Fri, 4 Dec 2015, MRAB wrote:
Constant folding is when, say, "1 + 2" replaced by "2".
Isn't that called backspacing? ;-)
Isaac Morland CSCF Web Guru
DC 2619, x36650 WWW Software Specialist
___
Python-De
to
keep source files readable and clean.
On that note, I'm not sure "stub" files is a particularly good name.
Maybe "type files" would be better? Something that emphasises that
they are the correct place to put type hints, not a workaround.
How about "header" files
o we just hunt down
and change the appropriate error messages for files (and possibly re) ?
Just a data point from a random programmer:
I like the \x07 solution for the error message as it draws attention to
the character at issue, but I also like to see \n, \t etc. in the result
of repr because it i
t that cesu-8 is an unknown encoding but that could
be changed without affecting the behaviour of the utf-8 codec.
It seems to me that .decode ('utf-8') should decode exactly and only valid
utf-8, including the non-use of surrogate pairs as an intermediate
encoding step.
Isaa
On Sat, 23 Aug 2014, Marko Rauhamaa wrote:
Isaac Morland :
HTTP/1.1 200 OK
Content-Type: text/html; charset=ISO-8859-1
For HTML it's not quite so bad. According to the HTML 4 standard:
[...]
The Content-Type header takes precedence over a element. I
thought I read once
whole area is a bit of an "arms race" between programmers
competing to get away with being as sloppy as possible and other
programmers who have to deal with their mess.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
lication ever written, in every language, which wants filenames to be
character strings.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist___
Python-Dev mailing list
Python-Dev@python.org
https://m
On Thu, 14 Aug 2014, Steven D'Aprano wrote:
On Thu, Aug 14, 2014 at 02:26:29AM +1000, Chris Angelico wrote:
On Wed, Aug 13, 2014 at 11:11 PM, Isaac Morland wrote:
While I would not claim a Python sandbox is utterly impossible, I'm
suspicious that the whole "consenting adul
a sandbox is to absolutely
prevent people from doing things even if they really want to and know what
they are doing.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev maili
On Sun, 23 Feb 2014, Nick Coghlan wrote:
Note that mandatory parentheses means we can duck the precedence
question entirely, which I count as another point in favour of
requiring them :)
Careful, if you take that too far then Python 4 will have to be Scheme. ;-)
Isaac Morland
according to the
range functions even if the bound is the infinity value of the base type.
Isaac Morland CSCF Web Guru
DC 2619, x36650 WWW Software Specialist___
Python-Dev mailing list
Python-Dev@python.org
https://mail
more sense for bytes (2.0) to
return the 8-byte IEEE representation than for it to return the ASCII
encoding of the decimal representation of the number.
Isaac Morland CSCF Web Guru
DC 2619, x36650 WWW Software Specialist
_
no benefit.
[]
All of this talk is positive, though. The fact that these topics have
finally reached the halls of python-dev are indication that people out
there are _trying_ to move to 3.3 :)
Agreed.
Isaac Morland CSCF Web Guru
DC 2619, x36650 WWW S
.(x, y) => x == y
b.() => SomeMethod()
ruby:
-> {|msg| puts msg}
python can use c# like and remove "lambda" keyword.
2.global variable
ruby
$glo_var
python can use $ or @ or another and remove "global".
Isaac Morland CSCF Web Guru
DC 2554C, x3665
t, i.e. a string, i.e. unicode.
[*] I apologize to anybody who just ate.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/l
edure instead of the procedure itself is
the locals() dictionary the procedure would start with (except presumably
missing non-parameter local variables).
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
__
perly-formatted
comments within the Python source?
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/pyth
ecoder, but it must
not be called UTF-8. Other variations may also find use if provided.
See UTF-8 RFC: http://www.ietf.org/rfc/rfc3629.txt
And CESU-8 technical report: http://www.unicode.org/reports/tr26/
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW So
ould in the presence of dead code), it
wouldn't catch cases of conditional premature use of a local variable. I
think in those cases people would still ask the same questions they do
with the existing implementation.
Isaac Morland CSCF Web Guru
DC 2554C, x36650
stage so it shouldn't have a real effect on the runtime of Python code. This
is also less convenient and "clean" than the current approach - this is why
I'm wondering whether the behavior is an artifact of the implementation.
x = 5
def foo ():
print (x)
if
On Wed, 27 Apr 2011, Antoine Pitrou wrote:
Isaac Morland wrote:
Python could also provide IEEE-754 equality as a function (perhaps in
"math"), something like:
def ieee_equal (a, b):
return a == b and not isnan (a) and not isnan (b)
+1 (perhaps call it math.eq()).
qual (a, b):
return a == b and not isnan (a) and not isnan (b)
Of course, the definition of math.isnan cannot then be by checking its
argument by comparison with itself - it would have to check the
appropriate bits of the float representation.
Isaac Morland CSCF Web Gur
09/09/10/singular-they-and-the-many-reasons-why-its-correct/
Also interesting:
http://en.wikipedia.org/wiki/Singular_they
Attention "he or she"ists: Singular "they" won before any of us was born.
You may want to divert your energies to a more worthy cause, such as
ensuring proper us
rd is justified I
will specifically disclaim any possibility of the suggestion being a joke.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
On Tue, 23 Nov 2010, Antoine Pitrou wrote:
Le mardi 23 novembre 2010 à 12:32 -0500, Isaac Morland a écrit :
On Tue, 23 Nov 2010, Antoine Pitrou wrote:
We already have a bunch of bizarrely unrelated stuff in collections
(such as Callable), so we could put enum there too.
Why not just "
ne of the basic kinds of types overall
(speaking informally and independent of any specific language) - they
aren't at all exotic. And "Flat is better than nested", after all.
Isaac Morland CSCF Web Guru
DC 2554C,
fiers.
!for boo in foo:
!if boo is !None:
!print(hoo)
!else:
!return !sorted(woo)
Is today April 1st?
Seriously, an identifier-quoting capability like PostgreSQL has wouldn't
necessarily be a bad idea, but would be a topic for python-ideas, not
here on py
e one typically wants this to be an error. And I
assume that one would not use the literal 17 in production code.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Pytho
is flat-out impossible.
Godel, Halting Problem, and all that.
So you don't need to apologize for not doing it ;-)
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
P
quot;
would be clearer if it made it clear that the file *names*, not (just?)
the file contents, will contain the magic tag.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing
"svn status", the only spurious result
will be "? __pycache__" rather than "? X.pyc" for every X.py in the
directory.
Or whatever other good effects come from having less junk in our source
directories.
Directory tidiness is a positive general feature with at least a fe
directory per source directory is
good enough to make me happy (and is Pythonically simple, in my opinion).
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@p
8 BLACK UNIVERSAL
RECYCLING SYMBOL for "proposal previously rejected is being re-proposed
due to changed circumstances".
For code don't forget great math operator symbols like U+2264
LESS-THAN OR EQUAL TO and U+222A UNION. But I doubt if anybody would want
to bake in
):
def packet():
for i in range(size):
yield l[p+i]
yield packet()
p = p + slide
if partialend or lenght-p == size:
def packet():
for i in range(lenght-p):
yield l[p+i]
yield packet()
Isaac Morland CSCF Web G
t, but how to translate them simply cannot be nailed
down once and for all.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/m
e absolutely right. I was thinking only of the fact that
read() at EOF is not an error, rather than the blocking behaviour. It
sounds like Python read() really is very similar to Unix read() in
behaviour.
Isaac Morland CSCF Web Guru
DC 2554C
yte file I doubt you expect any special notification that you are
now at EOF.
The Unix read() system call doesn't treat EOF as special other than it
won't return bytes from "beyond" EOF and therefore even when reading a
regular file could return fewer (including 0) bytes than a
. I hate having automatically generated
files in my workspace.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listin
nal trailing comma:
[
'a',
'b',
'c',
]
which is also a revision-control-friendly practice, and in the tuple
constuction context avoids the possibility of removing an item from a
two-tuple and ending up with not a one-tuple but instead just t
ing to go any further out on the limb by giving an example!).
Perhaps I misunderstand the intent of this manual page.
http://docs.python.org/lib/non-essential-built-in-funcs.html#l2h-88
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
this issue.
Trivia - right now there are *no* Google hits for 'python shared slice',
although there are lots for 'python shared slices'. They don't appear to
be talking about the same thing, however (without being exhaustive).
Isaac Morland
Hang around a couple of minutes,
though. It won't be long.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/l
ng editor to highlight it
somehow, and if the editor has a "rename" feature to rename a variable and
replace all references to it (but not other uses of the same identifiers
in different scope), then it probably should at least alert the programmer
before allowing a rename to or f
languages where '' are for character constants and "" are for strings so
it highlights them differently.
My personal opinion is that one should not use the different quoting
styles at random, but I am inclined to believe that there is no single
guideline th
t essentially needs to be
re-implemented.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe
On Wed, 16 Apr 2008, David Wolever wrote:
> On 16-Apr-08, at 9:37 AM, Isaac Morland wrote:
>> On Wed, 16 Apr 2008, Paul Moore wrote:
>>> On 16/04/2008, Armin Rigo <[EMAIL PROTECTED]> wrote:
>>>> What about the less confusing and more readily generalizable
contained in" the iterator will change as
the iterator iterates. Alternatively, the representation could be
"frozen" to reflect the values originally pending in the iterator, but
then the representation wouldn't show anything about the current state of
the iterator.
Isaac
//gcc.gnu.org/onlinedocs/cppinternals/Lexer.html has some information
related to the Gnu C preprocessor which may be relevant.
Have you considered also forcing Mac "\r" and DOS "\r\n" line endings to
Unix "\n" style?
Isaac Morland CSCF Web Guru
D
there is a
better-than-usual chance of getting precise float results. How often are
you going to check the output of sin() for being an integer? But on the
other hand pitfalls will occur if we, for example, replace 1/2 in my
example with 1/10, since these are not generally representable in flo
the input, not part of the output, in a
certain sense. Have people actually verified that the prompt is really
sent to stderr right now by using 2>/dev/null to attempt to suppress it?
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
_
h
having the Template constructor reject invalid template strings?
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailm
ate.__init__? For the applications I
can imagine of string.Template, I would prefer to get an error upon
creating the Template object rather than arbitrarily later when I try to
.substitute with it.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Special
ire to re-open any settled issues!
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsu
g should
be worth something
PS: I actually do like __universal__. The rest may be somewhat addled.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
c.
Something similar for Python would be very helpful for me.
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listin
On Thu, 15 Nov 2007, Isaac Morland wrote:
> 1. For the "name" attribute of the Parameter object, I think it needs to
> be str | tuple(str) | tuple(tuple(str)) | :
No, that's still wrong. I think it needs to be T,
where T == str | tuple(T).
Isaac Morland
(object):
def __init__ (self, argnames,
excessargs=None, excesskeys=None, defaults=None):
self.__argnames = tuple (argnames)
self.__excessargs = excessargs
self.__excesskeys = excesskeys
if defaults is None:
defaults
ameter)
if self.excesskeys is None:
if keys:
raise TypeError
else:
result[self.excesskeys] = keys
return result
Isaac Morland CSCF Web Guru
DC 2554C, x36650WWW Software Specialist
___
quot;, e1.realname
print "e1.email =", e1.email
print "e1 =", repr (e1)
print "str(e1) =", str (e1)
e2 = test.__fromvalues__ (email="[EMAIL PROTECTED]")
print "e2 =", repr (e2)
print "str(e2) =", str (e2)
65 matches
Mail list logo