Am 29.03.16 um 08:21 schrieb Rustom Mody:
Dijkstra liked to point out that CS was backward in America compared to Europe
because in Europe they used 'store' but Americans used anthropomorphism like
memory
Now given that store can mean -- among other things --
- room where I dump stuff
- shop wh
Rustom Mody :
> And my mum made the strange remark: "You guys use all the words that I
> know. And you make them into sentences that have no meaning at all."
That's what I think when I hear Estonian spoken.
> My own finding is that repurposing old words to new concepts causes
> more confusion an
Op dinsdag 29 maart 2016 00:29:29 UTC+2 schreef Peter Pearson:
> On Mon, 28 Mar 2016 14:10:28 -0700 (PDT), jenswaelk...@gmail.com wrote:
> > I'm using the tkFileDialog-module in Python 2.7, it works fine except
> > for one thing: when I add a title, the title isn't shown.
> >
> > e.g. I have this l
Am 29.03.16 um 07:20 schrieb sharad1...@gmail.com:
We've a test automation framework written in TCL (including the
automated test cases). We are evaluating shifting to Python and have
a test framework in Python (including the automated test cases).
Python provides a lot more 3rd party libraries t
On Tuesday, March 29, 2016 at 8:16:12 AM UTC+5:30, Ben Bacarisse wrote:
> Steven D'Aprano writes:
>
> > On Mon, 28 Mar 2016 06:51 pm, Jussi Piitulainen wrote:
> >
> >> Ben Bacarisse writes:
> >>
> >>> It's shame that anonymous functions (for that's what's being returned
> >>> here -- a function w
Hi
We've a test automation framework written in TCL (including the automated test
cases). We are evaluating shifting to Python and have a test framework in
Python (including the automated test cases). Python provides a lot more 3rd
party libraries that we'd like to make use of.
We use a pretty
On Tue, Mar 29, 2016 at 3:45 PM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> On Tue, Mar 29, 2016 at 12:40 AM, Marko Rauhamaa wrote:
>>> Dan Sommers :
>>>
On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote:
> As for Python, I don't feel a great need for anonymous functions.
Steven D'Aprano :
> On Tue, 29 Mar 2016 08:40 am, Chris Angelico wrote:
>
>> On Tue, Mar 29, 2016 at 12:40 AM, Marko Rauhamaa wrote:
>>> Dan Sommers :
>>>
On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote:
> As for Python, I don't feel a great need for anonymous functions.
> H
Chris Angelico :
> On Tue, Mar 29, 2016 at 12:40 AM, Marko Rauhamaa wrote:
>> Dan Sommers :
>>
>>> On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote:
>>>
As for Python, I don't feel a great need for anonymous functions.
However, I keep running into a need for anonymous classes, o
Hi David, once again, please reply all on this list.
I sent you a couple of step by step guides. Pleas look at the links that I
sent.
On Mon, Mar 28, 2016 at 9:12 PM, David Shi wrote:
> Hello, Justin,
>
> Is there any official step by step guide.
>
> Send me the download link and link to Offici
On 03/28/2016 06:44 PM, Steven D'Aprano wrote:
> http://lukeplant.me.uk/blog/posts/why-learning-haskell-python-makes-you-a-worse-programmer/
I have the same problem as the writer. Working in Python makes me
really dislike working in any other language!
--
https://mail.python.org/mailman/listinf
On 03/28/2016 05:44 PM, Steven D'Aprano wrote:
http://lukeplant.me.uk/blog/posts/why-learning-haskell-python-makes-you-a-worse-programmer/
Beautiful. And my deepest sympathies for the OP.
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Mar 29, 2016 at 1:45 PM, Ben Bacarisse wrote:
> If functions were defined
>
> fun f(x): return x * x
>
> then an anonymous function could be written as a function definition but
> the name
>
> fun (x): return x * x
>
> I suppose you could do that even with "def" but it's a bit less
> m
Steven D'Aprano writes:
> On Mon, 28 Mar 2016 06:51 pm, Jussi Piitulainen wrote:
>
>> Ben Bacarisse writes:
>>
>>> It's shame that anonymous functions (for that's what's being returned
>>> here -- a function with no name) were born of a subject that used
>>> arbitrary Greek letters for things.
On Tuesday, March 29, 2016 at 5:11:02 AM UTC+5:30, Steven D'Aprano wrote:
> On Mon, 28 Mar 2016 06:51 pm, Jussi Piitulainen wrote:
>
> > Ben Bacarisse writes:
> >
> >> It's shame that anonymous functions (for that's what's being returned
> >> here -- a function with no name) were born of a subjec
On Mon, Mar 28, 2016 at 5:17 PM, David Shi wrote:
> Hello, Justin,
>
> I am thinking of a fast, responsive, secure way of doing this. Python at
> server-side. It provides REST services. Data exchange with the
> web--page. Formatted XML or Json.
>
> Ideally, it uses the least code.
>
> Any exc
http://lukeplant.me.uk/blog/posts/why-learning-haskell-python-makes-you-a-worse-programmer/
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Mar 29, 2016 at 10:50 AM, Random832 wrote:
> On Mon, Mar 28, 2016, at 19:40, Steven D'Aprano wrote:
>> Not to mention "Monad". I don't think *anyone* knows what a Monad is ;-)
>
> A monad is just a monoid in the category of endofunctors; what's the
> problem?
>
> Well, someone had to say i
On Mon, Mar 28, 2016, at 19:40, Steven D'Aprano wrote:
> Not to mention "Monad". I don't think *anyone* knows what a Monad is ;-)
A monad is just a monoid in the category of endofunctors; what's the
problem?
Well, someone had to say it.
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, 28 Mar 2016 06:51 pm, Jussi Piitulainen wrote:
> Ben Bacarisse writes:
>
>> It's shame that anonymous functions (for that's what's being returned
>> here -- a function with no name) were born of a subject that used
>> arbitrary Greek letters for things. We seem stuck with the mysterious
On Tue, Mar 29, 2016 at 9:52 AM, Steven D'Aprano wrote:
> That would be called "type" :-)
>
> type(name, bases, namespace) returns a new class:
>
>
> py> C = type("MyClass", (object,), {'foo': 1})
> py> C
>
> py> C.foo
> 1
Yeah, but to do that in a single expression, you need to have all the
fun
On Mon, Mar 28, 2016 at 2:06 PM, David Shi via Python-list <
python-list@python.org> wrote:
> Has anyone done a recent reviews of creating REST services, in Python?
> Regards.
> David
> --
> https://mail.python.org/mailman/listinfo/python-list
>
There are a ton of different ways to do this. Can y
On Tue, 29 Mar 2016 08:40 am, Chris Angelico wrote:
> On Tue, Mar 29, 2016 at 12:40 AM, Marko Rauhamaa wrote:
>> Dan Sommers :
>>
>>> On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote:
>>>
As for Python, I don't feel a great need for anonymous functions.
However, I keep running i
On Mon, 28 Mar 2016 14:10:28 -0700 (PDT), jenswaelk...@gmail.com wrote:
> I'm using the tkFileDialog-module in Python 2.7, it works fine except
> for one thing: when I add a title, the title isn't shown.
>
> e.g. I have this line of code:
> inputfilename=tkFileDialog.askopenfilename(defaultextensio
On Mon, 28 Mar 2016 14:10:28 -0700, jenswaelkens wrote:
> I'm using the tkFileDialog-module in Python 2.7, it works fine except for one
> thing: when I add a title, the title isn't shown.
>
> e.g. I have this line of code:
> inputfilename=tkFileDialog.askopenfilename(defaultextension=".dat",
>
On 28/03/16 22:25, Chris Angelico wrote:
Just out of interest, did you (generic you) happen to notice Mark's
suggestion? It's a one-liner that nicely expresses the intention and
accomplishes the goal:
yy = [aa for aa in xx for _ in range(nrep)]
It quietly went through without fanfare, but I wo
Thanks Joel,
A quick look on Amazon shows it is probably relevant.
N.
--
https://mail.python.org/mailman/listinfo/python-list
There is information in Pro Django Models chapter that may be what you
want. Pro Django, Apress, Marty Alchin
On Mon, Mar 28, 2016 at 4:49 PM, Nick wrote:
> Django has the idea of specifying models using typed Fields.
> The same exists within SQLAlchemy
>
> Are there any tutorials on setting up
On Tue, Mar 29, 2016 at 12:40 AM, Marko Rauhamaa wrote:
> Dan Sommers :
>
>> On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote:
>>
>>> As for Python, I don't feel a great need for anonymous functions.
>>> However, I keep running into a need for anonymous classes, or,
>>> rather, classless o
On Tue, Mar 29, 2016 at 4:30 AM, Rob Gaddi
wrote:
> beliav...@aol.com wrote:
>
>> On Saturday, March 26, 2016 at 7:24:10 PM UTC-4, Erik wrote:
>>>
>>> Or, if you want to "import operator" first, you can use 'operator.add'
>>> instead of the lambda (but you _did_ ask for a one-liner ;)).
>>>
>>> Ou
I'm using the tkFileDialog-module in Python 2.7, it works fine except for one
thing: when I add a title, the title isn't shown.
e.g. I have this line of code:
inputfilename=tkFileDialog.askopenfilename(defaultextension=".dat",
filetypes=(("data file", "*.dat"),("All Files", "*.*") ),title='Selec
Has anyone done a recent reviews of creating REST services, in Python?
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
Django has the idea of specifying models using typed Fields.
The same exists within SQLAlchemy
Are there any tutorials on setting up a similar system.
ie. Declare classes and fields, query the meta data. Fields restricted to
certain types.
N.
--
https://mail.python.org/mailman/listinfo/pytho
Hi. It's hard to understand what your question is.
On 28/03/16 20:55, zljubisic...@gmail.com wrote:
> I have a python3 script that runs 24/7 on linux (raspberry pi)
> server. It would be very nice for the script to be able to send an
> email message about certain statuses.
Reading between the li
Op 27-03-16 om 03:46 schreef gvim:
> Given that Python, like Ruby, is an object-oriented language why doesn't this:
It has nothing to do with being object-oriented but by how scopes are used
> def m():
> a = []
> for i in range(3): a.append(lambda: i)
> return a
Python doesn't create a new
Hi,
I have a python3 script that runs 24/7 on linux (raspberry pi) server.
It would be very nice for the script to be able to send an email message about
certain statuses.
As the linux server is headless, I don't have an option to key in the password
while starting the script.
Furthermore, fro
On 3/27/2016 9:26 PM, Steven D'Aprano wrote:
On Mon, 28 Mar 2016 03:39 am, Terry Reedy wrote:
So Bart is proposing
whether 'actually' or 'hypothetically'
I don't think Bart is intending this as an actual proposal to change Python
so much as just a hypothetical to discuss.
I don't remembe
I don't understand what you're trying to do. But I think you have fixed
your problem:
Hongyi Zhao writes:
> It seems the above code will do the job for me.
If I understand correctly this sentence, you now have a satisfactory
solution. Good!
--
\ “A man must consider what a rich realm
beliav...@aol.com wrote:
> On Saturday, March 26, 2016 at 7:24:10 PM UTC-4, Erik wrote:
>>
>> Or, if you want to "import operator" first, you can use 'operator.add'
>> instead of the lambda (but you _did_ ask for a one-liner ;)).
>>
>> Out of interest, why the fascination with one-liners?
>
> T
On 28/03/2016 02:24, Steven D'Aprano wrote:
On Sun, 27 Mar 2016 10:31 pm, BartC wrote:
Whether there are side-effects is not quite as important as picking up
things that are likely to be errors:
f() # Probably OK
g() # Probably OK
f()+g() # Probably not OK
Yo
Dan Sommers :
> On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote:
>
>> As for Python, I don't feel a great need for anonymous functions.
>> However, I keep running into a need for anonymous classes, or,
>> rather, classless objects. Not a biggie. I just create a one-off
>> inner class and
BartC writes:
> On 28/03/2016 01:54, Steven D'Aprano wrote:
>> What should be the return value of this statement?
>>
>> while True:
>> x += 1
>> if condition: break
>
> Many statements such as loops just returned 'void' in A68. The
> interesting statements were if, case-switch and bloc
BartC writes:
> With more recent ones I've dropped that model, so that statements and
> expressions are different, and that is strictly enforced. This makes
> implementation simpler, and detects lots more errors.
You should try Haskell, where there are only expressions, but the ones
that perform
On Mon, 28 Mar 2016 11:58:54 +0300, Marko Rauhamaa wrote:
> As for Python, I don't feel a great need for anonymous functions.
> However, I keep running into a need for anonymous classes, or, rather,
> classless objects. Not a biggie. I just create a one-off inner class
> and instantiate it, but I
BartC :
> So no matter how many potentially useful counter-examples you can dig
> up, non-function-call expressions are still going to be highly
> unusual. And suspect.
>
> That's why it's not going to be much loss to disallow them /in that
> form/.
Note that operators are front ends for dunder m
On 28/03/2016 01:54, Steven D'Aprano wrote:
On Mon, 28 Mar 2016 03:58 am, BartC wrote:
One of Guido's principles in designing Python was to keep it simple,
even where that might mean people could make errors with it. This part
of the language is no different: any expression can be a statement.
Jussi Piitulainen :
> Ben Bacarisse writes:
>> It's shame that anonymous functions (for that's what's being returned
>> here -- a function with no name) were born of a subject that used
>> arbitrary Greek letters for things. We seem stuck with the mysterious
>> but meaningless "lambda" for a very
Ben Bacarisse writes:
> It's shame that anonymous functions (for that's what's being returned
> here -- a function with no name) were born of a subject that used
> arbitrary Greek letters for things. We seem stuck with the mysterious
> but meaningless "lambda" for a very simple and useful idea.
"Martin A. Brown" a écrit dans le message de
news:mailman.108.1459179618.28225.python-l...@python.org...
Greetings,
In a program "code.py" I read an external file "foo.txt" supposed
to be located in the same directory that "code.py"
python/src/code.py
python/src/foo.txt
In "code.py": f =
Greetings,
> In a program "code.py" I read an external file "foo.txt" supposed
> to be located in the same directory that "code.py"
>
> python/src/code.py
> python/src/foo.txt
>
> In "code.py": f = open('foo.txt', 'r')
>
> But if I run "python code.py" in an other dir than src/ say in
> python/
"Matt Wheeler" a écrit dans le message de
news:mailman.92.1458825746.2244.python-l...@python.org...
On Thu, 24 Mar 2016 11:10 Sven R. Kunze, wrote:
On 24.03.2016 11:57, Matt Wheeler wrote:
import ast
s = "(1, 2, 3, 4)"
t = ast.literal_eval(s)
t
> (1, 2, 3, 4)
I suppose
Hello
In a program "code.py" I read an external file "foo.txt" supposed
to be located in the same directory that "code.py"
python/src/code.py
python/src/foo.txt
In "code.py": f = open('foo.txt', 'r')
But if I run "python code.py" in an other dir than src/
say in python/, it will not work bec
On Mon, 28 Mar 2016 10:36:44 +0100, Mark Lawrence wrote:
> On 26/03/2016 02:37, Wildman via Python-list wrote:
>> On Sat, 26 Mar 2016 01:42:37 +, Mark Lawrence wrote:
>>
>>> On 25/03/2016 05:10, Wildman via Python-list wrote:
I have a program that I have been trying to rewrite so it will
On Mon, Mar 28, 2016, at 07:36, larudwer wrote:
> in case you want to mainain order:
>
> ["a","b"]*3
> ['a', 'b', 'a', 'b', 'a', 'b']
>
> is completely suffincient.
I think you've completely missed the point of what order he's talking
about. How do you turn ['a', 'c', 'b'] into ['a', 'a',
On Mon, 28 Mar 2016 21:29:48 +1100, Ben Finney wrote:
>> If I want to use python heredoc to substitute this external file for
>> the above codes. Is this possible?
>
> What do you mean by “Python heredoc”? What Python feature are you
> referring to?
I find the following methods currently:
impor
Am 27.03.2016 um 13:13 schrieb Antonio Caminero Garcia:
On Sunday, March 27, 2016 at 11:52:22 AM UTC+2, larudwer wrote:
how about
sorted(["a", "b"]*3)
['a', 'a', 'a', 'b', 'b', 'b']
that's cooler, less efficient though and do not maintain the original order.
In case such order was impo
Hongyi Zhao writes:
> If I want to use python heredoc to substitute this external file for
> the above codes. Is this possible?
What do you mean by “Python heredoc”? What Python feature are you
referring to?
--
\ “Anyone who puts a small gloss on [a] fundamental technology, |
`\
On 26/03/2016 02:37, Wildman via Python-list wrote:
On Sat, 26 Mar 2016 01:42:37 +, Mark Lawrence wrote:
On 25/03/2016 05:10, Wildman via Python-list wrote:
I have a program that I have been trying to rewrite so it will
run on Python 2.7 and 3.4.
This http://pythonhosted.org/six/ might c
I am trying to send audio using sockets to a different PC, but audio is not
clear on the other end and I cant understand why.
Here is the code:
import socket
import pyaudio
import wave
import sys
import pickle
import time
HOST=""
PORT=1061
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
CHU
Hi all,
See the following python codes:
import os
from subprocess import check_output
# POSIX: name shall not contain '=', value doesn't contain '\0'
output = check_output("source /home/werner/env-intel-toolchains.sh;
env -0", shell=True, executable="/bin/bash")
In the above codes, I
Am 28.03.2016 um 02:20 schrieb Steven D'Aprano:
On Mon, 28 Mar 2016 01:18 am, Bob Gailer wrote:
The problem with putting input at the end of a program is: if the program
raises an exception you won't see it.
True. But the solution to that is simple: don't make mistakes when
programming :-)
I
61 matches
Mail list logo