Re: Unicode 7

2014-05-02 Thread Steven D'Aprano
On Fri, 02 May 2014 19:01:44 +1000, Chris Angelico wrote: > On Fri, May 2, 2014 at 6:08 PM, Steven D'Aprano > wrote: >> ... even *Americans* cannot represent all their common characters in >> ASCII, let alone specialised characters from mathematics, science, the >&g

Re: Unicode 7

2014-05-02 Thread Steven D'Aprano
On Fri, 02 May 2014 03:39:34 -0700, Rustom Mody wrote: > On Friday, May 2, 2014 2:15:41 PM UTC+5:30, Steven D'Aprano wrote: >> On Thu, 01 May 2014 19:02:48 -0700, Rustom Mody wrote: >> > - Worst of all what we >> > *dont* see -- how many others dont see what we see

Re: Unicode 7

2014-05-02 Thread Steven D'Aprano
, x1 = 1, 2 If you know your victim is reading source code in Ariel font, "rn" and "m" are virtually indistinguishable except at very large sizes. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode 7

2014-05-02 Thread Steven D'Aprano
On Sat, 03 May 2014 02:02:32 +, Steven D'Aprano wrote: > On Fri, 02 May 2014 17:58:51 -0700, Rustom Mody wrote: > >> I am confused about the tone however: You think this >> >>>>> (fine, fine) = (1,2) # and no issue about it >> >> is fin

Re: Why has __new__ been implemented as a static method?

2014-05-03 Thread Steven D'Aprano
explicit class as its first argument. [end quote] I'm not entirely sure what he means by "upcalls", but I believe it means to call the method further up (that is, closer to the base) of the inheritance tree. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: [Call for Paper - SCOPUS/ISI THOMSON] ICESTI 2014, September 10-13, 2014, Kuta Bali - Indonesia

2014-05-03 Thread Steven D'Aprano
he saving of a few million tonnes, I think that would be well worth it. Of course, Bali happens to be one of the premier holiday destinations in the world. Presumably that's completely a coincidence... -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Why has __new__ been implemented as a static method?

2014-05-03 Thread Steven D'Aprano
On Sun, 04 May 2014 11:21:53 +1200, Gregory Ewing wrote: > Steven D'Aprano wrote: >> I'm not entirely sure what he means by "upcalls", but I believe it >> means to call the method further up (that is, closer to the base) of >> the inheritance tree. > &

Re: Why has __new__ been implemented as a static method?

2014-05-04 Thread Steven D'Aprano
On Sun, 04 May 2014 20:03:35 +1200, Gregory Ewing wrote: > Steven D'Aprano wrote: >> If it were a class method, you would call it by MyBaseClass.__new__() >> rather than explicitly providing the cls argument. > > But that wouldn't be any good, because the base

Re: Pass variable by reference

2014-05-06 Thread Steven D'Aprano
n't know the pathname of the file until you have extracted the version number as a string. path = "/var/lib/postgresql/%s/main/data" os.unlink(path % pgversion) will probably do what you want. Pass-by-reference doesn't come into this. If this is not what you mean, please explain in more detail. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Add "Received:" header to email msg in correct position?

2014-05-06 Thread Steven D'Aprano
s() return the actual message header list, or a copy? Because if it returns the list itself, you can just insert directly into the list using the insert method. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

[OT] Silde rules [was Re: Significant digits in a float?]

2014-05-06 Thread Steven D'Aprano
ic post myself, and I'm not obsessive about these things, but there comes a time in every off-topic thread where the right thing to do is to label it off-topic. And this thread has long passed that time! -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Pass variable by reference

2014-05-06 Thread Steven D'Aprano
It's Javascript, which is barely one step up from PHP regarding consistency. It could mean "constant" for all I know :-) -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Pass variable by reference

2014-05-06 Thread Steven D'Aprano
ce, and Java programmers swearing that Java does pass by value, for *exactly* the same behaviour that Python has. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Pass variable by reference

2014-05-06 Thread Steven D'Aprano
e like it. Hence we apply lossy compression to the concepts to get short names: C uses ints; Python uses ints and the distinction between the two is lost. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Python under the sea and in space

2014-05-07 Thread Steven D'Aprano
German movie, and I wonder whether you're thinking of the "mile high club", but other than that, I'm lost. In any case, O doubt that Jessica is asking in a figurative sense. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
f which the compiler puts a value, then Python has no variables. * If you think of id(x) as the identity of the *name* "x" rather than the identity of the object bound to "x", that is, if you think of id(x) as like a pointer to x, then you are mistaken. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Values and objects [was Re: Pass variable by reference]

2014-05-07 Thread Steven D'Aprano
packing and unpacking the values as needed. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
is only available at runtime (e.g. the assignment "x := 1;" is compiled to the equivalent of "look up x and bind the value 1 to it"). In Python, lookups occur at runtime, not compile time. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
but this behaviour? I note also that one may still have a name-binding model with copy-on- assign semantics. For example, one might add syntactic sugar to a Python- like language such that: spam = eggs is a name binding, and spam := eggs makes a copy of eggs before binding. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-07 Thread Steven D'Aprano
On Thu, 08 May 2014 12:09:21 +1000, Chris Angelico wrote: > On Thu, May 8, 2014 at 11:27 AM, Steven D'Aprano > wrote: >> If I have understood correctly, and I welcome confirmation or >> correction, one can have any combination of: >> >> * dynamic typing and

Re: data: protocol

2014-05-07 Thread Steven D'Aprano
;, what are you splitting and testing? It may also help if you show some Python 2.7 code that works, and what happens in 3.3. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
ons. The fact that you seem to believe that *memory locations* are somehow fundamental to computing goes to show just how pernicious the concept is. > (BTW, in lambda calculus and predicate logic, the names cannot be > rebound, but they are still called variables.) > > > Marko [1] Not actually forced, of course, because rejecting the claim as "obviously wrong" without thought is possible. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
t; Post-It note with a name to a box with the object's state, meaning > there's no way of copying any pointer, and it's still Python. Yes, exactly. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
On Thu, 08 May 2014 23:46:31 +1000, Chris Angelico wrote: > On Thu, May 8, 2014 at 11:18 PM, Steven D'Aprano > wrote: >> So... although I don't go quite so far as Ben in thinking that using >> the term "variable" in describing Python is harmful, I will

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
t a fixed location" model. Of those, Algol, Pascal and Fortran are either obsolete or legacy, and C is by far the most well-known by people here. (For some reason, few people seem to migrate from VB to Python.) Hence, "C-like". -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
on C, "variable" means what C does. The whole point is not that "name binding" somehow causes the reader to intuit the differences between early and late binding, or between boxes in fixed memory locations and name:value pairs in a namespace, but that it *opens their mind*

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
lists ARE objects. All values in Python are objects. > it behaves like calling by reference: It certainly does not. The best you can say is that mutation operations can, under some circumstances, mimic some of the effects of call by reference. For example, instead of using call by reference to get an output parameter, like Pascal uses, you can pass an object and mutate the object in place so that the caller sees the mutation. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-08 Thread Steven D'Aprano
On Thu, 08 May 2014 21:02:36 -0400, Dennis Lee Bieber wrote: > On 08 May 2014 16:04:51 GMT, Steven D'Aprano > declaimed the following: > >>Personally, I think that trying to be general and talk about "many other >>languages" is a failing strategy. Bette

Re: trailing underscores naming convention_

2014-05-09 Thread Steven D'Aprano
e. As for multiple underscores like in__ in___ in that's just too hideous for words. > And I also prefer pep8 method names as well, on_left_dclick1, etc. But > when the underlying library doesn't follow pep8, then I guess it does > not matter (self.Bind

Re: Why isn't my re.sub replacing the contents of my MS Word file?

2014-05-09 Thread Steven D'Aprano
e power of regexes, unload them on something that makes it worthwhile. Replacing a constant, fixed string with another constant, fixed string does not require a regex. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Why isn't my re.sub replacing the contents of my MS Word file?

2014-05-09 Thread Steven D'Aprano
encode('utf-16be') b'\x00a\x00a\x00a\x00a \x12\x00a\x00a\x00a\x00a' py> u'\u2012'.encode('utf-16le') b'a\x00a\x00a\x00a\x00\x12 a\x00a\x00a\x00a\x00' or something else. You're on *extremely* thin ice here. If you *must* do this,

Abstractions [was Re: Pass variable by reference]

2014-05-09 Thread Steven D'Aprano
whether micro code is an abstraction, that's fine, you can add a layer or two if you wish. But we're not far from *actual electric currents in an actual physical device*, at which point we're now talking about a concrete, physical description of the process, not an abstraction.

Re: Values and objects

2014-05-09 Thread Steven D'Aprano
disprove that statement: py> x = [1, 2, 3] # A structured object py> type(x) # that has a type > and you can't pass references to them. That at least you have got right. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The “does Python have variables?” debate

2014-05-09 Thread Steven D'Aprano
On Fri, 09 May 2014 17:34:17 -0500, Mark H Harris wrote: > On 5/7/14 8:27 PM, Steven D'Aprano wrote: >>> In almost every other language you know A and B each "contain" by >>> reference (and almost always by static type) macTruck. But NOT python. >> >

Re: The � debate

2014-05-09 Thread Steven D'Aprano
On Fri, 09 May 2014 13:10:41 +1200, Gregory Ewing wrote: > Steven D'Aprano wrote: >> Today we routinely call horseless carriages "cars", and nobody would >> blink if I pointed at a Prius or a Ford Explorer and said "that's not a >> carriage, it&#x

Re: Values and objects

2014-05-09 Thread Steven D'Aprano
t there's no way to pass variables to functions, embed them in lists, etc. The closest we can do is pass a string, the name of the variable, and a namespace: foo('spam', namespace) To be truly first class, we ought to be able to write something like this: x = 23 alist = [1, 2, x] alist[2] = 42 assert x == 42 but we cannot. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The � debate

2014-05-10 Thread Steven D'Aprano
On Sat, 10 May 2014 17:10:29 +1000, Chris Angelico wrote: > On Sat, May 10, 2014 at 3:58 PM, Gregory Ewing > wrote: >> Steven D'Aprano wrote: >>> >>> some_function(x, y+1)[key].attribute[num](arg)[spam or eggs] = 42 >>> >>> I'

Re: Values and objects

2014-05-10 Thread Steven D'Aprano
On Sat, 10 May 2014 17:21:56 +1000, Chris Angelico wrote: > On Sat, May 10, 2014 at 4:15 PM, Steven D'Aprano > wrote: >> On Sat, 10 May 2014 12:33:28 +1000, Chris Angelico wrote: >>> 1) Passing them as parameters. You can pass a pointer to a variable, >>> which

Re: The � debate

2014-05-10 Thread Steven D'Aprano
Not even local variables, since that's an implementation detail which the language takes pains to hide from the caller. The abstraction leaks a bit, but not much.) -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Error while calling round() from future.builtins

2014-05-10 Thread Steven D'Aprano
s://pypi.python.org/pypi/future If so, then I believe the library is buggy and you should report it to the Centos package maintainer. You might also manually install a more recent version of future. Decimal.from_float was only added in 2.7, it is not available in 2.6. https://docs.python

Re: Values and objects

2014-05-10 Thread Steven D'Aprano
r everything else search the chain nonlocals:globals:builtins. Name bindings (assignments, del, imports) for locals write only to the local scope. For globals they write only to the global scope and for nonlocals they write to the nearest enclosing nonlocal scope that already defines that variable. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Values and objects

2014-05-10 Thread Steven D'Aprano
n and Jython use an ordinary dict for local variable namespaces, just like globals. Consider this example from Jython: >>> spam = >>> def modify(namespace): ... namespace['spam'] = 42 ... >>> def demo(): ... modify(locals()) ... spam = spam ... return spam ... >>> demo() 42 -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Values and objects

2014-05-10 Thread Steven D'Aprano
On Sun, 11 May 2014 13:30:03 +1000, Chris Angelico wrote: > On Sun, May 11, 2014 at 1:17 PM, Steven D'Aprano > wrote: >> But that is an implementation detail. IronPython and Jython use an >> ordinary dict for local variable namespaces, just like globals. >> Cons

Re: Values and objects

2014-05-10 Thread Steven D'Aprano
If you don't have both pieces, you don't have a Python > variable. +1 Well said. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-11 Thread Steven D'Aprano
ript ...) Some of them, like Haskell, influence other languages without ever being popular themselves. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Free vs proprietary (was Re: NumPy, SciPy, & Python 3X Installation/compatibility issues)

2014-05-11 Thread Steven D'Aprano
Selling physical product is not the only way to make money from software, and in fact, most programmers are not paid to write software for sale. They are paid to write in-house applications which are never distributed outside of the company paying for their labour. -- Steven D'Apr

Re: Values and objects

2014-05-11 Thread Steven D'Aprano
I can turn that LOAD_FAST into a LOAD_GLOBAL, which then gives behaviour just like Lua: spam (the local variable) = spam (the global variable) Of course, this isn't a feature of Python the language. But with sufficient byte-code hacking skills, it is possible. > I am curious, though, what other python's do with respect to function > variables. As far as I know, Jython and IronPython store them in a dict namespace, just like globals. See my previous responses to Chris. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Values and objects

2014-05-11 Thread Steven D'Aprano
am print ("spam" in globals()) # prints False print (spam) # raises NameError The same applies to locals. Whether a slot is pre-allocated or not, the variable doesn't exist until there is a value bound to the name. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Values and objects

2014-05-11 Thread Steven D'Aprano
On Sun, 11 May 2014 11:26:41 +0300, Jussi Piitulainen wrote: > Marko Rauhamaa writes: >> Rustom Mody: >> >> > On Saturday, May 10, 2014 2:39:31 PM UTC+5:30, Steven D'Aprano wrote: >> >> >> >> Personally, I don't imagine that there ever

Re: Fortran

2014-05-11 Thread Steven D'Aprano
its of my vision and touch. (I haven't tried measuring them with a micrometer, or doing chemical analysis of the material they are made of.) -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Fortran

2014-05-11 Thread Steven D'Aprano
he softness of your fingers...) and maybe a couple of bells and whistles (e.g. can you cut on angles?). It's not within an order of magnitude of the complexity of a programming language. A better comparison would be with one of these: http://www.wisegeek.org/what-are-cnc-mac

Re: Fortran

2014-05-11 Thread Steven D'Aprano
On Mon, 12 May 2014 00:51:01 +0100, MRAB wrote: > On 2014-05-12 00:15, Steven D'Aprano wrote: >> On Sun, 11 May 2014 14:43:19 -0400, Roy Smith wrote: >>> Speaking of which, here's a trivia question. Without looking at your >>> keyboard, describe how the &q

Re: Fortran

2014-05-11 Thread Steven D'Aprano
On Mon, 12 May 2014 01:27:17 +0100, Mark Lawrence wrote: > On 12/05/2014 00:51, Steven D'Aprano wrote: >> >> Cars are standardized -- there are basically two types, manuals and >> automatics. >> >> > Sadly they can still go wrong due to modern engineer

Re: Everything you did not want to know about Unicode in Python 3

2014-05-12 Thread Steven D'Aprano
It would all be so simple. Reading Armin's post, I think that all that is needed to simplify his Python 3 version is: - have a bytes version of sys.argv (bargv? argvb?) and read the file names from that; - have a simple way to write bytes to stdout and stderr. Most programs won't

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-12 Thread Steven D'Aprano
using self- modifying code are virus writers, and the viruses they create are notorious for being buggy. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple Function Decorator Sample Snippet

2014-05-12 Thread Steven D'Aprano
ng overly complicated. > > Does this work? I have another one coming for args, similar, if this > works... comments appreciated. thanks. I tried to run your code, but every line is quoted with a > which causes a syntax error. Was there a reason you quoted the snippet? --

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-13 Thread Steven D'Aprano
after 15 years, I daresay that includes you. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-13 Thread Steven D'Aprano
On Tue, 13 May 2014 15:56:50 +1000, Chris Angelico wrote: > On Tue, May 13, 2014 at 3:48 PM, Steven D'Aprano > wrote: >> Self-modifying code is a nightmare inside the head of a Lovecraftian >> horror. There's a reason why almost the only people still using self-

Re: Everything you did not want to know about Unicode in Python 3

2014-05-13 Thread Steven D'Aprano
Py3 supports both > interpretations seemingly throughout: > >open(b"/bin/ls")vsopen("/bin/ls") os.path.join(b"a", b"b") >vs os.path.join("a", "b") Because it has to, otherwise there will be files that are unreachable on one platform or another. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything you did not want to know about Unicode in Python 3

2014-05-13 Thread Steven D'Aprano
those other people. True, true. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 8 : Maximum line Length :

2014-05-13 Thread Steven D'Aprano
many web/mailing-list fora. And smart phones. [...] > PS. > Last rule of python list: Always listen to Peter Otten. Yes. Peter is a treasure to the community, not just for his knowledge but for his patience and friendliness. -- Steven D'Aprano -- https://mail.python.org/mailman/listinfo/python-list

Re: Why isn't my re.sub replacing the contents of my MS Word file?

2014-05-13 Thread Steven D'Aprano
On Mon, 12 May 2014 10:35:53 -0700, scottcabit wrote: > On Friday, May 9, 2014 8:12:57 PM UTC-4, Steven D'Aprano wrote: > >> Good: >> >> >> >> fStr = re.sub(b'‒', b'-', fStr) >> >> > Doesn't work...the

Re: Everything you did not want to know about Unicode in Python 3

2014-05-13 Thread Steven D'Aprano
On Tue, 13 May 2014 14:42:51 +, alister wrote: > On Tue, 13 May 2014 13:51:20 +, Grant Edwards wrote: > >> On 2014-05-13, Steven D'Aprano >> wrote: >>> On Tue, 13 May 2014 07:20:34 -0400, Roy Smith wrote: >>> >>>> ASCII *is* all I nee

Re: Exception problem with module

2014-05-13 Thread Steven D'Aprano
r itself* setting the attribute, the better way is a_new_name = MyError or even from module.foo import MyError as a_new_name -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Fortran

2014-05-13 Thread Steven D'Aprano
On Tue, 13 May 2014 22:57:16 +0300, Marko Rauhamaa wrote: > Producing an effective JIT for Python seems like a formidable challenge > but not impossible in principle. Or in practice. http://pypy.org/ And it's predecessor: http://psyco.sourceforge.net/ -- Steven D'Apra

Re: Everything you did not want to know about Unicode in Python 3

2014-05-13 Thread Steven D'Aprano
me is how hard that is. Surely there's a simpler way to open stdin and stdout in binary mode? If not, there ought to be. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Fortran

2014-05-14 Thread Steven D'Aprano
On Wed, 14 May 2014 07:35:35 +0300, Marko Rauhamaa wrote: > Steven D'Aprano : > >> On Tue, 13 May 2014 22:57:16 +0300, Marko Rauhamaa wrote: >> >>> Producing an effective JIT for Python seems like a formidable >>> challenge but not impossible in pr

Re: Exception problem with module

2014-05-14 Thread Steven D'Aprano
ows the actual method and wraps the exception in another object. More likely, I think you'll find that the original MyError doesn't inherit from Exception. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 8 : Maximum line Length :

2014-05-14 Thread Steven D'Aprano
ion in 6th column, Comment is a C in 1st column, 7-72 for code > (ALONG WITH ALL CAPS CODE)? Nope. Because the main driving force for 79 characters is not technology but human reading. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 8 : Maximum line Length :

2014-05-15 Thread Steven D'Aprano
hardware, usability, and power. In my opinion, people will look back at the first decade of the 21st century as the golden age of personal computing. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 8 : Maximum line Length :

2014-05-15 Thread Steven D'Aprano
um readability for a range of typical text, including code. That's likely to be around 80 characters, which fits nicely with the historical standard. Reducing that to 80-1=79 means you're protected from "off-by-one" errors in either your counting or your editor. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 8 : Maximum line Length :

2014-05-15 Thread Steven D'Aprano
angle the presentation while keeping the semantics the same. You're inadvertently proposing the same thing (albeit to a lesser degree). -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: IndexError: pop from empty list

2014-05-15 Thread Steven D'Aprano
ance to gather some more data from the serial port. Ultimately, that's the problem: you're trying to process data faster than in can be collected. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 8 : Maximum line Length :

2014-05-16 Thread Steven D'Aprano
aviour, and turning it into an absurd statement of a "fundamental" (your word) which applies to every single human being on earth. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything you did not want to know about Unicode in Python 3

2014-05-16 Thread Steven D'Aprano
immediately into the public domain. It is true that under the Mickey Mouse Copyright Grab Act[1] of , every time Mickey Mouse is about to reach the end of copyright, Congress retroactively extends copyright terms for another few decades, but that's another story. [1] Not the real name

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Steven D'Aprano
On Sat, 17 May 2014 09:57:06 +0100, Robert Kern wrote: > On 2014-05-17 02:07, Steven D'Aprano wrote: >> On Fri, 16 May 2014 14:46:23 +, Grant Edwards wrote: >> >>> At least in the US, there doesn't seem to be such a thing as "placing >>> a wor

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Steven D'Aprano
for the high > variability in how different jurisdictions around the world treat their > own public domains. Yes to all that. >http://creativecommons.org/about/cc0 >http://wiki.creativecommons.org/CC0_FAQ > > Note how they distinguish the CC0 Waiver from their Pu

Re: Python and Math

2014-05-17 Thread Steven D'Aprano
Perl too inconsistent, with far too many special cases and tricks, and not enough of a consistent design. It's not as bad as PHP, but it gives me the impression of a language where the only design principle is "Oh, that looks cool. Hand me the welding iron, and I'll wel

Re: How keep Python 3 moving forward

2014-05-25 Thread Steven D'Aprano
s fine. He correctly quotes JMF stating "Voilà" (that's LATIN SMALL LETTER A WITH GRAVE), and Ethan's post correctly gives an encoding header: Content-Type: text/plain; charset=iso-8859-1; format=flowed (although, boo to Thunderbird for using a legacy encoding instead of UTF-8)

Re: Make Python Compilable, convert to Python source to Go

2014-05-26 Thread Steven D'Aprano
he says it does, that's valuable. Python 2.7 will be part of the Python ecosystem until at least 2022. Furthermore, adapting an existing Python2 to Go compiler to work with Python3 will be much easier than writing one from scratch. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: confused about the different built-in functions in Python

2014-05-26 Thread Steven D'Aprano
s are attributes of the class, not the instance. Like all class attributes, you can retrieve them by doing a lookup on the instance, you can shadow them by storing an attribute of the same name on the instance, but you cannot rebind or delete them directly on the instance, since they aren't on the instance. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Build tools, and Python 3 dependencies (was: How keep Python 3 moving forward)

2014-05-26 Thread Steven D'Aprano
for the purpose of a higher cause. In Batman's case that higher cause is justice and the good of Gotham City. What's your higher cause? -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Build tools, and Python 3 dependencies (was: How keep Python 3 moving forward)

2014-05-26 Thread Steven D'Aprano
in to a single course of action even more tightly than if you had more. At least that's the impression that you have given. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: hashing strings to integers

2014-05-27 Thread Steven D'Aprano
an arrange matters so that you never need to MD5 hash a string twice. Is my guess closer to the actuality than yours? I don't know. I haven't measured it either. But I know that Python is a high-level language with lots of high-level data structures like dicts which trade-off time and memory for programmer convenience, and that I'd want to see some real benchmarks proving that my application was too slow before giving up that convenience with a complicated strategy like this. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Re: IDE for python

2014-05-28 Thread Steven D'Aprano
all of this from a single tab, using the screen command to manage virtual tabs. I am not one of those people. For the same reason, I prefer GUI editors over emacs or vim. -- Steven D'Aprano http://import-that.dreamwidth.org/ -- https://mail.python.org/mailman/listinfo/python-list

Python alternative to Google Groups

2014-05-28 Thread Steven Clift
web. Our non-profit is a big user and just released our mobile responsive design - http://forums.e-democracy.org We are looking to collaborate with other orgs and developers. Note: http://e-democracy.org/groupserver Cheers, Steven Clift E-Democracy.org ᐧ -- https://mail.python.org/mailman

Re: How to run script from interpreter?

2014-05-28 Thread Steven D'Aprano
On Wed, 28 May 2014 11:39:23 -0500, Mark H Harris wrote: > On 5/28/14 2:44 AM, [email protected] wrote: >> On Friday, January 19, 2001 1:22:23 AM UTC+5:30, Rolander, Dan wrote: >>> What is the best way to run a python script from within the . >>> interpre

Re: Python 3 is killing Python

2014-05-28 Thread Steven D'Aprano
the main Linux distros start using Python 3 as their system Python, there will be a sudden rush of people to Python 3; - about six months before Python 2 drops out of free support, there will be a sudden flood of panicky cries for help from people who didn't bother making a *single* step towards migration over the previous ten years, and suddenly realise that they need to migrate yesterday. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 is killing Python

2014-05-28 Thread Steven D'Aprano
is guaranteed to return the same sequence of values, random.choice is not); - removal of obsolete modules like bastion and rotor. Any and all of these things can break code that relies on them. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Python alternative to Google Groups

2014-05-29 Thread Steven Clift
Ah, I wasn't referring to Google Groups newsgroup/usenet connection, but if one wanted to host open source based online groups themselves that are similar to the web experience with Google Groups overall. While folks who just want a mailing list are well served by Mailman, Sympa, and others ... fo

Re: Fortran

2014-05-29 Thread Steven D'Aprano
o cutting edge. [1] Unladen Swallow was not a failure. It's just that expectations were so high ("OMG OMG Google is making a Python compiler this will be more powerful than the Death Star and faster than time travel!!!1!") that it couldn't help but be a disappointment. [

Re: How to run script from interpreter?

2014-05-29 Thread Steven D'Aprano
by prefixing them with ! and has an entire subsystem of user-configurable "magic" commands using % prefix. (By the way, ; won't work for a Python shell, because ;spam already is valid Python syntax: it's an empty statement followed by the statement spam, separated by a semicol

Re: How to run script from interpreter?

2014-05-29 Thread Steven D'Aprano
On Fri, 30 May 2014 10:46:34 +1000, Chris Angelico wrote: > On Fri, May 30, 2014 at 10:33 AM, Steven D'Aprano > wrote: >> (By the way, ; won't work for a Python shell, because ;spam already is >> valid Python syntax: it's an empty statement followed by the

Re: How to run script from interpreter?

2014-05-29 Thread Steven D'Aprano
On Fri, 30 May 2014 12:04:27 +1000, Chris Angelico wrote: > On Fri, May 30, 2014 at 11:49 AM, Steven D'Aprano > wrote: >> On Fri, 30 May 2014 10:46:34 +1000, Chris Angelico wrote: >> >>> On Fri, May 30, 2014 at 10:33 AM, Steven D'Aprano >>> wrot

Re: How to run script from interpreter?

2014-05-30 Thread Steven D'Aprano
On Fri, 30 May 2014 17:19:00 +1000, Chris Angelico wrote: > On Fri, May 30, 2014 at 4:20 PM, Steven D'Aprano > wrote: >>> It's on par with creating a file with a name beginning with a hyphen, >>> and then fiddling around with various commands as you try to >&

Re: How to run script from interpreter?

2014-05-30 Thread Steven D'Aprano
On Fri, 30 May 2014 21:46:55 +1000, Chris Angelico wrote: > On Fri, May 30, 2014 at 9:27 PM, Steven D'Aprano > wrote: >> This is why I'm so adamant that, while REPLs may be permitted to >> introduce *new* syntax which is otherwise illegal to the Python parser, >&g

Re: Python 3 is killing Python

2014-05-31 Thread Steven D'Aprano
ce with 2.7, you will be more than capable of dealing with the differences with version 3. They are not different languages, think of them as slightly different dialects of the same language, like UK and South African English. -- Steven D'Aprano http://import-that.dreamwidth.org/ -

Re: Python 3.2 has some deadly infection

2014-05-31 Thread Steven D'Aprano
r semantics is simply false. "with non-confusing error handling" -- How is Python 3's error handling confusing? It's the same error handling as Python 2. Where is the confusion? TL;DR: Anatoly's blog post is long on disappointment and short on actual content. It feels to me that we could summarise his post as: I don't know what I want, I won't recognise it even if I saw it, but Python 3 isn't it. I blame others for not living up to my expectations for features I cannot describe and were never promised. -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Business model

2014-05-31 Thread Steven D'Aprano
g the answers given last time will be useful. After you have read those dozen or so answers, please come back with any further questions. Here's the link again: http://code.activestate.com/lists/python-list/60/ -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: IDE for python

2014-06-01 Thread Steven D'Aprano
e .com with .соm. To put it another way: py> аррlе = 23 py> apple = 42 py> assert аррlе == apple Traceback (most recent call last): File "", line 1, in AssertionError -- Steven -- https://mail.python.org/mailman/listinfo/python-list

<    64   65   66   67   68   69   70   71   72   73   >