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

2017-07-24 Thread Isaac Morland
lse: > ... > > 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 > ___ > Python-D

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 <anto...@python.org> wrote: > > Le 17/07/2017 à 15:26, Isaac Morland a écrit : >

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 >

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
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 ___ Python-Dev mailing li

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

2016-04-11 Thread Isaac Morland
ed to be correct and unbreakable. 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, x3

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-Dev mai

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

2015-04-20 Thread Isaac Morland
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? (ducks...) Isaac Morland CSCF Web

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

2015-02-24 Thread Isaac Morland
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 is more readable for the common cases. Isaac Morland

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

2014-08-29 Thread Isaac Morland
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. Isaac Morland CSCF Web Guru DC 2554C, x36650

Re: [Python-Dev] Bytes path support

2014-08-25 Thread Isaac Morland
On Sat, 23 Aug 2014, Marko Rauhamaa wrote: Isaac Morland ijmor...@uwaterloo.ca: HTTP/1.1 200 OK Content-Type: text/html; charset=ISO-8859-1 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta http-equiv=Content-Type content=text/html; charset=utf-16 For HTML

Re: [Python-Dev] Bytes path support

2014-08-23 Thread Isaac Morland
with their mess. Isaac Morland CSCF Web Guru DC 2554C, x36650WWW Software Specialist ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https

Re: [Python-Dev] Bytes path support

2014-08-21 Thread Isaac Morland
. Isaac Morland CSCF Web Guru DC 2554C, x36650WWW Software Specialist___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman

Re: [Python-Dev] Reviving restricted mode?

2014-08-13 Thread Isaac Morland
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 mailing list Python-Dev@python.org https

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 ijmor...@uwaterloo.ca wrote: While I would not claim a Python sandbox is utterly impossible, I'm suspicious that the whole consenting

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
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.python.org/mailman/listinfo/python-dev Unsubscribe: https

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

2014-01-15 Thread Isaac Morland
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
. 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 Software Specialist___

Re: [Python-Dev] python symbolizition

2013-06-14 Thread Isaac Morland
...@gmail.com wrote: 1.lambda expression c# a.(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

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

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

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

2012-06-06 Thread Isaac Morland
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 ___ Python-Dev mailing

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

2012-02-11 Thread Isaac Morland
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/python-dev Unsubscribe: http

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

2011-08-25 Thread Isaac Morland
: 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 Software Specialist ___ Python-Dev mailing list Python-Dev@python.org

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

2011-05-09 Thread Isaac Morland
- this is why I'm wondering whether the behavior is an artifact of the implementation. x = 5 def foo (): print (x) if bar (): x = 1 print (x) Isaac Morland CSCF Web Guru DC 2554C, x36650WWW Software Specialist

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

2011-05-09 Thread Isaac Morland
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, x36650WWW Software Specialist ___ Python-Dev

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Isaac Morland
): 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 Guru DC 2554C

Re: [Python-Dev] PyObject_RichCompareBool identity shortcut

2011-04-27 Thread Isaac Morland
On Wed, 27 Apr 2011, Antoine Pitrou wrote: Isaac Morland ijmor...@uwaterloo.ca 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] Support the /usr/bin/python2 symlink upstream

2011-03-04 Thread Isaac Morland
/Singular_they Attention he or sheists: 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 use of whom. Isaac Morland CSCF Web Guru DC 2554C, x36650WWW Software Specialist

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

2010-11-23 Thread Isaac Morland
(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, x36650WWW Software Specialist ___ Python-Dev

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 enum

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

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

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

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

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

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

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 Python

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

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

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

2010-03-23 Thread Isaac Morland
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 few specific benefits. Isaac Morland CSCF Web Guru DC 2554C

Re: [Python-Dev] __pycache__ creation

2010-03-22 Thread Isaac Morland
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@python.org http://mail.python.org/mailman

Re: [Python-Dev] Oddity PEP 0 key

2009-05-02 Thread Isaac Morland
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 an absolute requirement for Unicode support in order to be able to read or write Python code. Isaac Morland

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

2009-03-20 Thread Isaac Morland
(): 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 Guru DC 2554C, x36650

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

2008-12-11 Thread Isaac Morland
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/mailman/listinfo/python-dev Unsubscribe: http

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

2008-09-02 Thread Isaac Morland
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 asked for in the call. Isaac

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

2008-08-28 Thread Isaac Morland
workspace. 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: http://mail.python.org

Re: [Python-Dev] String concatenation

2008-08-23 Thread Isaac Morland
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 the item itself. 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
not going 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] Conditional For Statements

2008-05-18 Thread Isaac Morland
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/listinfo/python-dev Unsubscribe

Re: [Python-Dev] On quote styles

2008-05-12 Thread Isaac Morland
is that one should not use the different quoting styles at random, but I am inclined to believe that there is no single guideline that can apply to everybody. Isaac Morland CSCF Web Guru DC 2554C, x36650WWW Software Specialist

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

2008-05-12 Thread Isaac Morland
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 from the magic name. Isaac Morland

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

2008-04-20 Thread Isaac Morland
. If it is not, then doing something like files matching these glob patterns except for those matching this non-glob-expressible condition and also those files matching this second non-glob-expressible condition becomes painful because the glob part essentially needs to be re-implemented. Isaac

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: range object 0, 1, ..., 9 It would also

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

2008-03-18 Thread Isaac Morland
/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 DC 2554C, x36650WWW Software Specialist

Re: [Python-Dev] New math functions

2008-02-20 Thread Isaac Morland
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 float format. Isaac Morland CSCF Web Guru DC 2554C, x36650WWW

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

2008-01-24 Thread Isaac Morland
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 ___ Python-Dev mailing list Python-Dev@python.org http

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

2008-01-04 Thread Isaac Morland
rather than arbitrarily later when I try to .substitute with it. Isaac Morland CSCF Web Guru DC 2554C, x36650WWW Software Specialist ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

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

2007-12-14 Thread Isaac Morland
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 Unsubscribe: http://mail.python.org

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

2007-11-29 Thread Isaac Morland
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 http://mail.python.org/mailman/listinfo/python

Re: [Python-Dev] .pyc location?

2007-11-27 Thread Isaac Morland
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/listinfo/python-dev

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

2007-11-15 Thread Isaac Morland
.__defaults = dict (defaults) [] Thanks for the responses. I hope the above is at least in part not a re-hash of old discussions. Isaac Morland CSCF Web Guru DC 2554C, x36650WWW Software Specialist ___ Python-Dev

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 CSCF Web Guru DC 2554C

[Python-Dev] Suggestions for Improvements to namedtuple

2007-11-14 Thread Isaac Morland
) =, str (e2) 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: http://mail.python.org

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

2007-11-14 Thread Isaac Morland
: if keys: raise TypeError else: result[self.excesskeys] = keys return result Isaac Morland CSCF Web Guru DC 2554C, x36650WWW Software Specialist ___ Python-Dev mailing