Re: [Python-Dev] for...else

2017-07-24 Thread Isaac Morland
... > > 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

Re: [Python-Dev] Impact of Namedtuple on startup time

2017-07-17 Thread Isaac Morland
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

Re: [Python-Dev] Impact of Namedtuple on startup time

2017-07-17 Thread Isaac Morland
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

Re: [Python-Dev] Why does base64 return bytes?

2016-06-15 Thread Isaac Morland
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

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-12 Thread Isaac Morland
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 __

Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016-04-11 Thread Isaac Morland
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

Re: [Python-Dev] Third milestone of FAT Python

2015-12-04 Thread Isaac Morland
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

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-20 Thread Isaac Morland
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

Re: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-24 Thread Isaac Morland
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

Re: [Python-Dev] surrogatepass - she's a witch, burn 'er! [was: Cleaning up ...]

2014-08-29 Thread Isaac Morland
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

Re: [Python-Dev] Bytes path support

2014-08-25 Thread Isaac Morland
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

Re: [Python-Dev] Bytes path support

2014-08-23 Thread Isaac Morland
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 ___

Re: [Python-Dev] Bytes path support

2014-08-21 Thread Isaac Morland
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

Re: [Python-Dev] Reviving restricted mode?

2014-08-13 Thread Isaac Morland
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

Re: [Python-Dev] Reviving restricted mode?

2014-08-13 Thread Isaac Morland
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

Re: [Python-Dev] PEP 463: Exception-catching expressions

2014-02-23 Thread Isaac Morland
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

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

2014-02-14 Thread 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

Re: [Python-Dev] PEP 461 - Adding % and {} formatting to bytes

2014-01-15 Thread Isaac Morland
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 _

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Isaac Morland
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

Re: [Python-Dev] python symbolizition

2013-06-14 Thread Isaac Morland
.(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

Re: [Python-Dev] Why can't I encode/decode base64 without importing a module?

2013-04-25 Thread Isaac Morland
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

Re: [Python-Dev] Updated PEP 362 (Function Signature Object)

2012-06-06 Thread Isaac Morland
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 __

Re: [Python-Dev] PEP 411: Provisional packages in the Python standard library

2012-02-11 Thread Isaac Morland
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

Re: [Python-Dev] PEP 393 Summer of Code Project

2011-08-25 Thread Isaac Morland
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

Re: [Python-Dev] more timely detection of unbound locals

2011-05-09 Thread Isaac Morland
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

Re: [Python-Dev] more timely detection of unbound locals

2011-05-09 Thread Isaac Morland
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

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Isaac Morland
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()).

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Isaac Morland
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

Re: [Python-Dev] Support the /usr/bin/python2 symlink upstream

2011-03-04 Thread Isaac Morland
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

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Isaac Morland
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

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Isaac Morland
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 "

Re: [Python-Dev] constant/enum type in stdlib

2010-11-23 Thread Isaac Morland
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,

Re: [Python-Dev] Set the namespace free!

2010-07-22 Thread Isaac Morland
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

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Isaac Morland
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

Re: [Python-Dev] Possible patch for functools partial - Interested?

2010-05-07 Thread Isaac Morland
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

Re: [Python-Dev] PEP 3147 ready for pronouncement and merging

2010-04-14 Thread Isaac Morland
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

Re: [Python-Dev] PEP 3147, __pycache__ directorie s and umask

2010-03-23 Thread Isaac Morland
"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

Re: [Python-Dev] __pycache__ creation

2010-03-22 Thread Isaac Morland
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

Re: [Python-Dev] Oddity PEP 0 key

2009-05-02 Thread Isaac Morland
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

Re: [Python-Dev] Proposal: new list function: pack

2009-03-20 Thread Isaac Morland
): 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

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-11 Thread Isaac Morland
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

Re: [Python-Dev] fileobj.read(float): warning or error?

2008-09-03 Thread Isaac Morland
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

Re: [Python-Dev] fileobj.read(float): warning or error?

2008-09-02 Thread Isaac Morland
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

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

2008-08-28 Thread Isaac Morland
. 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

Re: [Python-Dev] String concatenation

2008-08-23 Thread Isaac Morland
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

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Isaac Morland
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

Re: [Python-Dev] Slice as a copy... by design?

2008-05-22 Thread Isaac Morland
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

Re: [Python-Dev] Conditional For Statements

2008-05-18 Thread 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

Re: [Python-Dev] Problems with the new super()

2008-05-12 Thread Isaac Morland
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

Re: [Python-Dev] On quote styles

2008-05-12 Thread Isaac Morland
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

Re: [Python-Dev] A smarter shutil.copytree ?

2008-04-20 Thread Isaac Morland
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

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Isaac Morland
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

Re: [Python-Dev] string representation of range in 3.0

2008-04-16 Thread Isaac Morland
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

Re: [Python-Dev] Introducing the ``make check`` command

2008-03-18 Thread Isaac Morland
//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

Re: [Python-Dev] New math functions

2008-02-20 Thread Isaac Morland
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

Re: [Python-Dev] Incorrect documentation of the raw_input built-in function

2008-01-24 Thread Isaac Morland
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 _

Re: [Python-Dev] Extracting variables from string.Template objects

2008-01-04 Thread Isaac Morland
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

[Python-Dev] Extracting variables from string.Template objects

2008-01-04 Thread Isaac Morland
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

Re: [Python-Dev] Signals+Threads (PyGTK waking up 10x/sec).

2007-12-14 Thread Isaac Morland
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

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

2007-11-29 Thread Isaac Morland
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

Re: [Python-Dev] .pyc location?

2007-11-27 Thread Isaac Morland
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

Re: [Python-Dev] Python Library Addition: First-class Procedure Signatures

2007-11-15 Thread Isaac Morland
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

Re: [Python-Dev] Python Library Addition: First-class Procedure Signatures

2007-11-15 Thread 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

[Python-Dev] Python Library Addition: First-class Procedure Signatures

2007-11-14 Thread Isaac Morland
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 ___

[Python-Dev] Suggestions for Improvements to namedtuple

2007-11-14 Thread Isaac Morland
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)