On Monday, April 7, 2014 9:08:23 PM UTC-7, Chris Angelico wrote:
> That depends on whether calling Brand() unnecessarily is a problem.
> Using setdefault() is handy when you're working with a simple list or
> something, but if calling Brand() is costly, or (worse) if it has side
> effects that you
Dennis Lee Bieber :
> That's been my experience too... Threading works for me... My
> attempts at so called asyncio (whatever language) have always led to
> my having to worry about losing data if some handler takes too long to
> return.
>
> To me, asyncio is closer to a polling interr
On Tue, Apr 8, 2014 at 2:02 PM, Josh English wrote:
> On Sunday, April 6, 2014 12:44:13 AM UTC-7, Giuliano Bertoletti wrote:
>
>
>> obj = brands_seen.get(brandname)
>>
>> if obj is None:
>> obj = Brand()
>> brands_seen[brandname] = obj
>>
>>
>
> Would dict.setdefault() solve this problem?
On Sunday, April 6, 2014 12:44:13 AM UTC-7, Giuliano Bertoletti wrote:
> obj = brands_seen.get(brandname)
>
> if obj is None:
> obj = Brand()
> brands_seen[brandname] = obj
>
>
Would dict.setdefault() solve this problem? Is there any advantage to
defaultdict over setdefault()
Josh
Hi,
In Pylint you can change the spacing multiplier from 4 spaces to two
in its pylintrc, but for the life of me I cannot find a way to do this
with the flake8 / pep8 utilities.
I want to avoid ignoring E111 altogether if at all possible, because
it may catch other spacing problems that are not a
On Tue, Apr 8, 2014 at 11:33 AM, Mark H Harris wrote:
> Does a function (or generator) 'do' something (based on name and parms) or
> does it 'return' something based on name and parms?
If it has no side effects, then it does something, where the
'something' is returning a value. "Return" is a ver
On Mon, 07 Apr 2014 20:16:05 -0400, Terry Reedy wrote:
> On 4/7/2014 11:26 AM, Paul Kölle wrote:
>
>> >>> c = (1,2,3)
>> >>> d = (1,2,3)
>> >>> c is d
>> False
>
> An implementation would be allowed to make that True, as it does for
> small ints and short strings that could be identifiers.
A
Hi all,
I have a question regarding gdb python.
I use gdb7.7 and python2.7.6.
Here is snippet that py-print one variable:
(gdb) py-print self
local 'self' = ,
timer513645288=<_Timeout at remote 0xb42f760>, timer1248840930=<_Timeout at
remote 0x7f85f7f4c300>, timer1678666863=<_Timeout at remote
Dennis Lee Bieber wrote:
> That's been my experience too... Threading works for me... My attempts
> at so called asyncio (whatever language) have always led to my having to
> worry about losing data if some handler takes too long to return.
>
> To me, asyncio is closer to a polling
On 2014-04-08 02:33, Mark H Harris wrote:
On 4/6/14 12:31 PM, Rustom Mody wrote:
I think python wins because it (usually) lets people do their thing
(includes but not limited to CS-research)
and gets out of the way. To say therefore that it is irrelevant to the
research is a strange inversion
On 4/6/14 12:31 PM, Rustom Mody wrote:
I think python wins because it (usually) lets people do their thing
(includes but not limited to CS-research)
and gets out of the way. To say therefore that it is irrelevant to the
research is a strange inversion of its advantages.
I think so too. I f
On 4/7/2014 11:26 AM, Paul Kölle wrote:
>>> c = (1,2,3)
>>> d = (1,2,3)
>>> c is d
False
An implementation would be allowed to make that True, as it does for
small ints and short strings that could be identifiers.
>>> a = 'one'
>>> b = 'one'
>>> a == b; a is b
True
True
However, duplica
On Tue, Apr 8, 2014 at 5:46 AM, Paul Kölle wrote:
> Thanks Chris, stupid error indeed ;)
Error, at least :) This is why we have a mailing list: errors,
inaccuracies, and typos, regardless of who makes them or when, are
pretty much guaranteed to be caught.
ChrisA
--
https://mail.python.org/mailm
Am 07.04.2014 17:44, schrieb Chris Angelico:
On Tue, Apr 8, 2014 at 1:26 AM, Paul Kölle wrote:
It seems a tuple's immutability is debatable, or is this another instance of
the small-integer-reuse-implementation-detail-artifact?
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on li
On Tue, Apr 8, 2014 at 1:26 AM, Paul Kölle wrote:
> It seems a tuple's immutability is debatable, or is this another instance of
> the small-integer-reuse-implementation-detail-artifact?
>
> Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
> [GCC 4.4.5] on linux2
>
> Type "help", "copyright", "cre
Am 06.04.2014 09:25, schrieb Gary Herron:
On 04/05/2014 11:53 PM, John Ladasky wrote:
I find this programming pattern to be useful... but can it cause
problems?
No.
What kind of problems are you considering? It won't break Python. It's
perfectly legal code.
The tuple c is still immutable, co
On Tue, Apr 8, 2014 at 12:51 AM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> On Mon, Apr 7, 2014 at 11:49 PM, Marko Rauhamaa wrote:
>>> Roy Smith :
>>> IOW, the processes are there to exercise the CPUs and should not
>>> represent individual connections or other dynamic entities.
>>
>> That's p
Chris Angelico :
> On Mon, Apr 7, 2014 at 11:49 PM, Marko Rauhamaa wrote:
>> Roy Smith :
>> IOW, the processes are there to exercise the CPUs and should not
>> represent individual connections or other dynamic entities.
>
> That's potentially brutal on a shared system! I hope it's controlled
> by
Hi,
Wingware has released version 5.0.5 of Wing IDE, our cross-platform
integrated
development environment for the Python programming language.
Wing IDE includes a professional quality code editor with vi, emacs,
visual studio,
and other key bindings, auto-completion, call tips, goto-definiti
On Mon, Apr 7, 2014 at 11:49 PM, Marko Rauhamaa wrote:
> Roy Smith :
>
>> The idea that we should continue to use threading just because Windows
>> makes process creation hideously expensive compared to thread creation
>> doesn't impress me as an argument in favor of threading. It impresses
>> me
On Mon, Apr 7, 2014 at 11:22 PM, Roy Smith wrote:
> In all things technology related, there is an evolutionary path. It
> goes something like this:
>
> * bleeding edge
> * avant-garde
> * what the kewl kids are using
> * modern
> * mainstream
> * traditional
> * corporate standard
> * legacy
> *
Hi All,
I'm pleased to announce the release of testfixtures 3.0.2. This is a bug
fix release featuring the following changes:
- Document ShouldRaise.raised and make it part of the official API.
- Fix rare failures when cleaning up TempDirectory instances on Windows.
If you haven't bumped int
Roy Smith :
> The idea that we should continue to use threading just because Windows
> makes process creation hideously expensive compared to thread creation
> doesn't impress me as an argument in favor of threading. It impresses
> me as an argument in favor of ditching Windows.
There are many re
On 07/04/2014 14:22, Roy Smith wrote:
When I started using Python (1.4), it was somewhere around avant-garde.
Now, I figure it's mainstream, which probably means it's time for me to
move on to something else soon :-)
Python 2.8?
--
My fellow Pythonistas, ask not what our language can do for
In article ,
Chris Angelico wrote:
> On Mon, Apr 7, 2014 at 10:26 PM, Roy Smith wrote:
> > Whether something works well on Windows is really not something I worry
> > about a lot.
>
> It's a concern for some of us.
You have my sympathy.
> it's a fully-supported platform for a lot of Python s
On Mon, Apr 7, 2014 at 10:26 PM, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> On Mon, Apr 7, 2014 at 1:48 PM, Roy Smith wrote:
>> > There is (or at least, was) another reason. Creating a new process used
>> > to be far more expensive than creating a new thread. In modern Unix
In article ,
Chris Angelico wrote:
> On Mon, Apr 7, 2014 at 1:48 PM, Roy Smith wrote:
> > There is (or at least, was) another reason. Creating a new process used
> > to be far more expensive than creating a new thread. In modern Unix
> > kernels, however, the cost difference has become much
On Mon, 07 Apr 2014 07:54:27 +0300, Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> On Sun, 06 Apr 2014 23:10:47 +0300, Marko Rauhamaa wrote:
>>> It is academic because the author, Raymond Smullyan, was a professor
>>> of philosophy and, more importantly, my professor selected that as a
>>> textbo
Hi,
I am developing a web application using flask, Werkzeug and jinja2. I am very
much confused with these terms and wanted to know the meaning of the terms and
how they are interrelated to the CGI environment variables. What is global
variable g and how it is related to the application contex
29 matches
Mail list logo