"writeson" wrote in message
news:09917103-b35e-4728-8fea-bcb4ce2bd...@googlegroups.com...
> Hi all,
>
> I've written a program using Twisted that uses SqlAlchemy to access a
> database using threads.deferToThread(...) and SqlAlchemy's
> scoped_session(...). This program runs for a long time, b
Jason Friedman writes:
> I have XML which looks like:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> The "Property X" string appears twice times and I want to output the "path"
> that leads to all such appearances.
You could use "lxml" and its "xpath" support.
Jason Friedman wrote:
> I have XML which looks like:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> The "Property X" string appears twice times and I want to output the
> "path"
> that leads to all such appearances. In this case the output would be:
>
> LEVE
On Thursday, June 20, 2013 7:57:28 PM UTC-5, Steven D'Aprano wrote:
> On Thu, 20 Jun 2013 11:05:32 -0700, Rick Johnson wrote:
> > Python functions are objects that take arguments, of
> > which (the arguments) are then converted to attributes
> > of the function object.
> Arguments in general are *n
On Thu, Jun 20, 2013 at 3:41 AM, Antoon Pardon
wrote:
> There are two problems with your reasoning. The first is that you
> are equivocating on "expect". "Expect" can mean you will be surprised
> if it doesn't happen but it can also mean you will feel indignant or
> disappointed or something simil
On Thu, 20 Jun 2013 10:12:01 -0700, rusi wrote:
> Python (and all the other 'cool' languages) dont have gotchas because
> someone malevolently put them there.
> In most cases, the problem is seen too late and the cost of changing
> entrenched code too great.
> Or the problem is clear, the solution
rusi於 2013年6月21日星期五UTC+8上午1時12分01秒寫道:
> You know Rick, you are good at python, you are better at polemics.
>
> If only you would cut the crap I would (be able to) agree with you.
>
> See below
>
>
>
> On Jun 20, 7:49 pm, Rick Johnson wrote:
>
> > On Thursday, June 20, 2013 7:57:06 AM UTC-5,
On 2013-06-20 21:40, Roy Smith wrote:
> In article ,
> Tim Chase wrote:
>
> > On 2013-06-21 01:08, Steven D'Aprano wrote:
> > > Here's my syntax plucked out of thin air:
> > >
> > > def func(arg, x=expression, !y=expression):
> > > ...
> > >
> > > where y=expression is late-bound, and the
In article ,
Tim Chase wrote:
> On 2013-06-21 01:08, Steven D'Aprano wrote:
> > Here's my syntax plucked out of thin air:
> >
> > def func(arg, x=expression, !y=expression):
> > ...
> >
> > where y=expression is late-bound, and the above is compiled to:
> >
> > def func(arg, x=expression,
I have XML which looks like:
The "Property X" string appears twice times and I want to output the "path"
that leads to all such appearances. In this case the output would be:
LEVEL_1 {}, LEVEL_2 {"ATTR": "hello"}, ATTRIBUTE {"NAME": "Property X",
On Thu, 20 Jun 2013 07:49:37 -0700, Rick Johnson wrote:
> When the subroutine is completed, all inputs and local variables are
> expected to be destroyed. If the programmer wants a return value, he
> need simply ask. Data persistence is not a function of subroutines!
> Finally, a subroutine should
On 2013-06-21 01:08, Steven D'Aprano wrote:
> Here's my syntax plucked out of thin air:
>
> def func(arg, x=expression, !y=expression):
> ...
>
> where y=expression is late-bound, and the above is compiled to:
>
> def func(arg, x=expression, y=None):
> if y is None:
> y = express
On Thu, 20 Jun 2013 11:57:34 -0600, Ian Kelly wrote:
> Additionally, with late-binding semantics the default values would no
> longer be default *values*. They would be initialization code instead,
> which sort of flies in the face of the idea that late-binding would
> somehow be better for funct
On 6/20/2013 2:44 PM, Alister wrote:
On Thu, 20 Jun 2013 11:35:49 -0700, Wanderer wrote:
Do I need to uninstall Python 2.7.3 before installing Python 2.7.5?
Thanks
that will depend on your operating system an possibly the variety of
python
"Python 2.7.3' and 'Python 2.7.5' are by trademark
On Thu, 20 Jun 2013 11:05:32 -0700, Rick Johnson wrote:
> On Thursday, June 20, 2013 10:38:34 AM UTC-5, Chris Angelico wrote:
>> Function defaults in Python, being implemented as attributes on the
>> function object, are very similar in nature to static variables in C.
>
> Oh wait a minute. i thi
On 21/06/2013 4:07 AM, Rick Johnson wrote:
Okay. So now you are admitting the problem. That is a good
start. Thanks for being honest.
If you think mutable default arguments is a "problem", then you don't
really understand Python. The only "gotcha" here is in people's heads.
--
http://mail.py
In article <51c39b88$0$2$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Thu, 20 Jun 2013 09:19:48 -0400, Roy Smith wrote:
>
> > In article
> > <447dd1c6-1bb2-4276-a109-78d7a067b...@d8g2000pbe.googlegroups.com>,
> > rusi wrote:
> >
> >> > > def f(a, L=[]):
> >> > > Â Â
On Thu, 20 Jun 2013 09:19:48 -0400, Roy Smith wrote:
> In article
> <447dd1c6-1bb2-4276-a109-78d7a067b...@d8g2000pbe.googlegroups.com>,
> rusi wrote:
>
>> > > def f(a, L=[]):
>> > > L.append(a)
>> > > return L
>
>> Every language has gotchas. This is one of python's.
>
> One of our pr
On 20Jun2013 13:55, Neil Cerutti wrote:
| On 2013-06-20, Joshua Landau wrote:
| > On 20 June 2013 04:11, Cameron Simpson wrote:
| >> Also, opening-and-not-closing a set of brackets is almost the
| >> only way in Python to make this kind of error (syntax at one
| >> line, actual mistake far befor
On 20Jun2013 15:33, Oscar Benjamin wrote:
| On 20 June 2013 04:11, Cameron Simpson wrote:
| > I use vi/vim and it both shows the matching bracket when the cursor
| > is on one and also have a keystroke to bounce the curser between
| > this bracket and the matching one.
| >
| > If you suspect you
jfhar...@gmail.com wrote:
> Hi,
>
> Sorry if this appears twice, I sent it to the mailing list earlier and the
> mail seems to have been swallowed by the black hole of email vagaries.
>
> We have a class which executes external processes in a controlled
> environment and does "things" specified
On 20/06/2013 17:27, wxjmfa...@gmail.com wrote:
Le jeudi 20 juin 2013 13:43:28 UTC+2, MRAB a écrit :
On 20/06/2013 07:26, Steven D'Aprano wrote:
On Wed, 19 Jun 2013 18:46:59 -0700, Rick Johnson wrote:
On Thursday, June 13, 2013 2:11:08 AM UTC-5, Steven D'Aprano wrote:
Gah! That's
On Thursday, June 20, 2013 2:47:52 PM UTC-4, MRAB wrote:
> On 20/06/2013 19:35, Wanderer wrote:
>
> > Do I need to uninstall Python 2.7.3 before installing Python 2.7.5?
>
> >
>
> No.
You're right. I had no problems. FYI the operating system is Windows 7.
Thanks
--
http://mail.python.org/mail
I'm trying to get setup to work on pylint source. I've installed
pylint, logilab-common and astroid in the usual manner, specifying
--user to get them into my private space:
python setup.py install --user
If I attempt to import astroid from a Python prompt, everything's
fine:
% PYTHONPATH=/
On 20/06/2013 19:35, Wanderer wrote:
Do I need to uninstall Python 2.7.3 before installing Python 2.7.5?
No.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 20 Jun 2013 11:35:49 -0700, Wanderer wrote:
> Do I need to uninstall Python 2.7.3 before installing Python 2.7.5?
>
> Thanks
that will depend on your operating system an possibly the variety of
python
--
I don't even butter my bread. I consider that cooking.
-- Kath
Do I need to uninstall Python 2.7.3 before installing Python 2.7.5?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 20, 10:57 pm, Ian Kelly wrote:
> If
> the goal is indeed to make the the functions more functional, then the
> proper solution would be to keep the binding early but just disallow
> mutable defaults altogether -- which is tricky to achieve in Python,
> so we simply emulate it with the advic
On Thursday, June 20, 2013 12:12:01 PM UTC-5, rusi wrote:
> Python (and all the other 'cool' languages) dont have
> gotchas because someone malevolently put them there. In
> most cases, the problem is seen too late and the cost of
> changing entrenched code too great.
Okay. So now you are admitt
On Thursday, June 20, 2013 10:38:34 AM UTC-5, Chris Angelico wrote:
> Function defaults in Python, being implemented as
> attributes on the function object, are very similar in
> nature to static variables in C.
Oh wait a minute. i think it's becoming clear to me now!
Python functions are objects
On Thu, Jun 20, 2013 at 11:19 AM, Chris Angelico wrote:
> On Fri, Jun 21, 2013 at 3:12 AM, rusi wrote:
>> Python (and all the other 'cool' languages) dont have gotchas because
>> someone malevolently put them there.
>> In most cases, the problem is seen too late and the cost of changing
>> entren
On Jun 20, 10:19 pm, Chris Angelico wrote:
> On Fri, Jun 21, 2013 at 3:12 AM, rusi wrote:
> > Python (and all the other 'cool' languages) dont have gotchas because
> > someone malevolently put them there.
> > In most cases, the problem is seen too late and the cost of changing
> > entrenched code
On Fri, Jun 21, 2013 at 3:12 AM, rusi wrote:
> Python (and all the other 'cool' languages) dont have gotchas because
> someone malevolently put them there.
> In most cases, the problem is seen too late and the cost of changing
> entrenched code too great.
> Or the problem is clear, the solution is
Rick Johnson writes:
> On Thursday, June 20, 2013 9:04:50 AM UTC-5, Andrew Berg wrote:
> > On 2013.06.20 08:40, Rick Johnson wrote:
>
> > > then what is the purpose of a Unicode Braille character set?
> > Two dimensional characters can be made into 3 dimensional shapes.
>
> Yes in the real worl
On Fri, Jun 21, 2013 at 3:17 AM, MRAB wrote:
> On 20/06/2013 17:37, Chris Angelico wrote:
>>
>> On Fri, Jun 21, 2013 at 2:27 AM, wrote:
>>>
>>> And all these coding schemes have something in common,
>>> they work all with a unique set of code points, more
>>> precisely a unique set of encoded co
Νίκος schreef:
Στις 18/6/2013 12:05 μμ, ο/η Steven D'Aprano έγραψε:
Names are *always* linked to objects, not to other names.
a = []
b = a # Now a and b refer to the same list
a = {} # Now a refers to a dict, and b refers to the same list as before
I see, thank you Steven.
But since this is
On 20/06/2013 17:37, Chris Angelico wrote:
On Fri, Jun 21, 2013 at 2:27 AM, wrote:
And all these coding schemes have something in common,
they work all with a unique set of code points, more
precisely a unique set of encoded code points (not
the set of implemented code points (byte)).
Just wh
You know Rick, you are good at python, you are better at polemics.
If only you would cut the crap I would (be able to) agree with you.
See below
On Jun 20, 7:49 pm, Rick Johnson wrote:
> On Thursday, June 20, 2013 7:57:06 AM UTC-5, rusi wrote:
> > Every language has gotchas. This is one of python
Rick Johnson wrote:
>
> Since we're on the subject of Unicode:
>
>One the most humorous aspects of Unicode is that it has
>encodings for Braille characters. Hmm, this presents a
On Fri, Jun 21, 2013 at 2:27 AM, wrote:
> And all these coding schemes have something in common,
> they work all with a unique set of code points, more
> precisely a unique set of encoded code points (not
> the set of implemented code points (byte)).
>
> Just what the flexible string representati
Le jeudi 20 juin 2013 13:43:28 UTC+2, MRAB a écrit :
> On 20/06/2013 07:26, Steven D'Aprano wrote:
>
> > On Wed, 19 Jun 2013 18:46:59 -0700, Rick Johnson wrote:
>
> >
>
> >> On Thursday, June 13, 2013 2:11:08 AM UTC-5, Steven D'Aprano wrote:
>
> >>
>
> >>> Gah! That's twice I've screwed that u
If you'are looking for hosting some Python in the cloud, let me introduce you
to http://python-cloud.com/
This PaaS platform can automatically scale up and down your application
regarding your traffic. You can also finely customize if you want vertical,
horizontal or both types of scalabilit
On Thu, Jun 20, 2013 at 11:55 PM, Neil Cerutti wrote:
> On 2013-06-20, Joshua Landau wrote:
>> On 20 June 2013 04:11, Cameron Simpson wrote:
>>> Also, opening-and-not-closing a set of brackets is almost the
>>> only way in Python to make this kind of error (syntax at one
>>> line, actual mistake
On Fri, Jun 21, 2013 at 12:49 AM, Russel Walker wrote:
> On Thursday, June 20, 2013 12:45:27 PM UTC+2, Antoon Pardon wrote:
>> Op 19-06-13 18:14, russ.po...@gmail.com schreef:
>>
>> >
>>
>> all(map(lambda x: bool(x), xrange(10**9)))
>>
>> Since you already have your answer, I just like to get
On Fri, Jun 21, 2013 at 12:49 AM, Rick Johnson
wrote:
> When the subroutine is completed, all inputs and local
> variables are expected to be destroyed. If the programmer
> wants a return value, he need simply ask. Data persistence
> is not a function of subroutines!
Funny, C violates your descri
On Thu, Jun 20, 2013 at 11:40 PM, Rick Johnson
wrote:
> Your generalization is analogous to explaining web browsers
> as: "software that allows a user to view web pages in the
> range www.*" Do you think someone could implement a web
> browser from such limited specification? (if that was all
> th
On Fri, Jun 21, 2013 at 1:12 AM, Rick Johnson
wrote:
> On Thursday, June 20, 2013 9:04:50 AM UTC-5, Andrew Berg wrote:
>> On 2013.06.20 08:40, Rick Johnson wrote:
>
>> > then what is the purpose of a Unicode Braille character set?
>> Two dimensional characters can be made into 3 dimensional sh
On Thursday, June 20, 2013 9:04:50 AM UTC-5, Andrew Berg wrote:
> On 2013.06.20 08:40, Rick Johnson wrote:
> > then what is the purpose of a Unicode Braille character set?
> Two dimensional characters can be made into 3 dimensional shapes.
Yes in the real world. But what about on your compute
On Tuesday, June 18, 2013 10:10:42 AM UTC-4, upper...@gmail.com wrote:
> I am new to python and struggling with creating a dynamic if statement.
>
>
>
> I have a set of queries that are run against various databases/tables. The
> result is all the same in that I always get back the same field
On Thursday, June 20, 2013 12:45:27 PM UTC+2, Antoon Pardon wrote:
> Op 19-06-13 18:14, russ.po...@gmail.com schreef:
>
> >
>
> all(map(lambda x: bool(x), xrange(10**9)))
>
>
>
> Since you already have your answer, I just like to get your attention
>
> to the fact the the lambda is super
On Thursday, June 20, 2013 7:57:06 AM UTC-5, rusi wrote:
> Every language has gotchas. This is one of python's.
So are we purposely injecting illogic into our language just
to be part of some "cool crowd" of programming languages with
gotchas.
"You thought intuitiveness was a virtue? Haha, we go
On 20 June 2013 04:11, Cameron Simpson wrote:
> I use vi/vim and it both shows the matching bracket when the cursor
> is on one and also have a keystroke to bounce the curser between
> this bracket and the matching one.
>
> If you suspect you failed to close a bracket, one approach is to
> go _bel
On 2013.06.20 08:40, Rick Johnson wrote:
> One the most humorous aspects of Unicode is that it has
> encodings for Braille characters. Hmm, this presents a
> conundrum of sorts. RIDDLE ME THIS?!
>
> Since Braille is a type of "reading" for the blind by
> utilizing the sense of touch (there
On 2013-06-20, Joshua Landau wrote:
> On 20 June 2013 04:11, Cameron Simpson wrote:
>> Also, opening-and-not-closing a set of brackets is almost the
>> only way in Python to make this kind of error (syntax at one
>> line, actual mistake far before).
>>
>> See if your editor has a show-the-matchin
On 20 June 2013 05:13, Thanatos xiao wrote:
> Hey everyone!
> Recently I see the python source code, but i still not understand about gil.
> first, why single core quicker multi-core ?
Chris Angelico touched on your other points, but not this as clearly;
Python threads run on one thread because
On Thursday, June 20, 2013 1:26:17 AM UTC-5, Steven D'Aprano wrote:
> The *implementation* is easy to explain. It's the names of
> the encodings which I get tangled up in.
Well, ignoring the fact that you're last explanation is
still buggy, you have not actually described an
"implementation", no,
On 20 June 2013 04:11, Cameron Simpson wrote:
> Also, opening-and-not-closing a set of brackets is almost the only
> way in Python to make this kind of error (syntax at one line, actual
> mistake far before).
>
> See if your editor has a show-the-matching-bracket mode.
> If you suspect you failed
On Jun 20, 6:19 pm, Roy Smith wrote:
> In article
> <447dd1c6-1bb2-4276-a109-78d7a067b...@d8g2000pbe.googlegroups.com>,
>
> rusi wrote:
> > > > def f(a, L=[]):
> > > > L.append(a)
> > > > return L
> > Every language has gotchas. This is one of python's.
>
> One of our pre-interview scree
Hi,
Sorry if this appears twice, I sent it to the mailing list earlier and the mail
seems to have been swallowed by the black hole of email vagaries.
We have a class which executes external processes in a controlled environment
and does "things" specified by the client program with each line of
In article
<447dd1c6-1bb2-4276-a109-78d7a067b...@d8g2000pbe.googlegroups.com>,
rusi wrote:
> > > def f(a, L=[]):
> > > L.append(a)
> > > return L
> Every language has gotchas. This is one of python's.
One of our pre-interview screening questions for Python programmers at
Songza is ab
On Jun 20, 12:38 am, Rick Johnson
wrote:
> On Wednesday, June 19, 2013 2:17:35 PM UTC-5, Ahmed Abdulshafy wrote:
> > I'm reading the Python.org tutorial right now, and I found
> > this part rather strange and incomprehensible to me>
>
> > Important warning: The default value is evaluated only
> >
On 20/06/2013 07:26, Steven D'Aprano wrote:
On Wed, 19 Jun 2013 18:46:59 -0700, Rick Johnson wrote:
On Thursday, June 13, 2013 2:11:08 AM UTC-5, Steven D'Aprano wrote:
Gah! That's twice I've screwed that up. Sorry about that!
Yeah, and your difficulty explaining the Unicode implementation r
Op 19-06-13 18:14, russ.po...@gmail.com schreef:
>
all(map(lambda x: bool(x), xrange(10**9)))
Since you already have your answer, I just like to get your attention
to the fact the the lambda is superfluous here. Your expression
above is equivallent to
all(map(bool, xrange(10**9)))
--
ht
> If you're getting this via the mailing list, just hit Reply, and then
>
> change the To: address to python-list@python.org - that's the simplest
>
> (assuming you don't have a Reply To List feature, but you wouldn't be
>
> saying the above if you had one). That way, you get a citation line,
>
Op 19-06-13 20:40, Ian Kelly schreef:
> On Wed, Jun 19, 2013 at 4:57 AM, Antoon Pardon
> wrote:
>> I don't remember making such a claim. What I do remember is
>> you among others claiming that the problem was not (so much)
>> the troll (Nikos) but the others.
> Count me among those who feel this
On 20 Jun 2013 08:46, wrote:
>
> Hello.
>
> I need to run xmlrpc Server under Python 3.3 and Client under Python 2.7.
But when I try to do so, I receive the following exception:
>
> ":global name 'xmlrpclib' is not defined"
Somewhere in your code you are trying to use the name 'xmlrpclib' but it
On 20/06/2013 08:36, stanislav.boriso...@gmail.com wrote:
Hello.
I need to run xmlrpc Server under Python 3.3 and Client under Python 2.7. But
when I try to do so, I receive the following exception:
":global name 'xmlrpclib' is not defined"
What is the reason for such an exception. As far as
Hello.
I need to run xmlrpc Server under Python 3.3 and Client under Python 2.7. But
when I try to do so, I receive the following exception:
":global name 'xmlrpclib' is not defined"
What is the reason for such an exception. As far as I understand xmlrpc is
language independent. Please help.
On Thu, Jun 20, 2013 at 1:31 AM, Rick Johnson
wrote:
> On Wednesday, June 19, 2013 8:58:19 AM UTC-5, augus...@gmail.com wrote:
>> This is my first post in this group and the reason why I
>> came across here is that, despite my complete lack of
>> knowledge in the programming area, I received an or
69 matches
Mail list logo