"Chris Angelico" wrote in message
news:captjjmps+vfu33tulae5oivrvn_otfuxrp8yluy68qmu36-...@mail.gmail.com...
On Thu, Jan 14, 2016 at 5:27 PM, Frank Millman wrote:
> Using LBYL, one would retrieve the row(s) and check the length. I found
> a
> way to use EAFP, as follows -
>
> cur.execute('S
On Thu, Jan 14, 2016 at 5:27 PM, Frank Millman wrote:
> Using LBYL, one would retrieve the row(s) and check the length. I found a
> way to use EAFP, as follows -
>
> cur.execute('SELECT ...')
> (row,) = cur
>
> This uses tuple unpacking, and only works if exactly one row is returned. If
> it fails
Steven D'Aprano :
> What about those who are so frustrated with trying to get sites to
> work that they just Allow All On This Page?
I'm occasionally frustrated by that, but I simply won't read that page.
Nothing truly important is lost.
Marko
--
https://mail.python.org/mailman/listinfo/python
On 1/11/2016 3:45 PM, Travis Griggs wrote:
On Jan 10, 2016, at 9:48 AM, Bernardo Sulzbach
wrote:
Essentially, classes (as modules) are used mainly for organizational purposes.
Although you can solve any problem you would solve using classes
without classes, solutions to some big problems ma
This is a tongue-in-cheek follow-up to the thread on Python 4 incompatible
code, but it did happen to me, and may help someone else.
I execute a lot of database SELECT commands. In many cases I expect to get
only one row returned, but it could be zero or more than one.
Using LBYL, one would r
On 1/13/2016 8:02 PM, Rick Johnson wrote:
and a leader who lost his cushy job at Google
Unless you have access to facts that I do not, 'lost' is impolite
speculation. But lets move on.
I have a contrary hypothesis based on the facts quoted below. As far as
I know, Google is somewhat stuck
On 01/13/2016 08:29 PM, Rick Johnson wrote:
> Of course. But when you leave things open for speculation,
> you enviably create a situation where rumors can start
> circulating. GvR is not just any "John Doe" engineer, no,
> he's the head of an open source community, and the community
> has a right
On Wednesday, January 13, 2016 at 9:08:40 PM UTC-6, Chris Angelico wrote:
> You're talking about a very serious matter between two legal entities
> - if someone was *fired* because of social, technological, or other
> problems with Python, that has implications that could matter in a
> court of law
On Thu, Jan 14, 2016 at 1:51 PM, Rick Johnson
wrote:
> On Wednesday, January 13, 2016 at 8:11:40 PM UTC-6, Michael Torrie wrote:
>> Hmm, so Guido moved to Dropbox because Google fired him?
>> [...] I can find zero evidence to support your assertion,
>
> Feel free to post evidence that will *DISPRO
On Wednesday 13 January 2016 21:39:12 Dennis Lee Bieber wrote:
> On Thu, 14 Jan 2016 12:02:59 +1100, Steven D'Aprano
>
>
> declaimed the following:
> >On Thu, 14 Jan 2016 11:40 am, Bernardo Sulzbach wrote:
> >> On Wed, Jan 13, 2016 at 10:10 PM, Steven D'Aprano
> >>
> >>
> >> wrote:
> >>> (...)
On Wednesday, January 13, 2016 at 8:11:40 PM UTC-6, Michael Torrie wrote:
> Hmm, so Guido moved to Dropbox because Google fired him?
> [...] I can find zero evidence to support your assertion,
Feel free to post evidence that will *DISPROVE* my statement.
> Dishonesty is a harsh accusation, but wh
On Wed, Jan 13, 2016 at 7:30 PM, Steven D'Aprano
wrote:
> On Thu, 14 Jan 2016 08:41 am, David H. Lipman wrote:
>
> > From: "Laura Creighton"
> >
> >>
> >> I fell recently. Ought to be nothing, but a small chip of bone, either
> >> an
> >
> > Due to the side-effects of the prescription drugs you
On 01/13/2016 06:02 PM, Rick Johnson wrote:
> In fact, in the years before Python3 arrived, it had enjoyed
> a steady ascension from obscurity into mainstream hacker
> culture, but now, all that remains is a fractured community,
> a fractured code base, and a leader who lost his cushy job
> at Goog
On 14/01/2016 01:21, Chris Angelico wrote:
On Thu, Jan 14, 2016 at 12:02 PM, BartC wrote:
I was surprised recently by just how much incompatibility there was between
Python 2 and 3. It wasn't just about print with parentheses and range
instead of xrange.
I wanted to try out a jpeg decoder with
On Thu, Jan 14, 2016 at 12:02 PM, Rick Johnson
wrote:
> In fact, in the years before Python3 arrived, it had enjoyed
> a steady ascension from obscurity into mainstream hacker
> culture, but now, all that remains is a fractured community,
> a fractured code base, and a leader who lost his cushy jo
On 01/13/2016 06:02 PM, Steven D'Aprano wrote:
> Or we're too busy dealing with rising sea levels, crop failures, antibiotic
> resistant diseases, chaotic mass migrations, terrorists, wars for control
> over resources like water, and the collapse of the corporate state to care
> about such little t
On Thu, Jan 14, 2016 at 12:02 PM, BartC wrote:
> I was surprised recently by just how much incompatibility there was between
> Python 2 and 3. It wasn't just about print with parentheses and range
> instead of xrange.
>
> I wanted to try out a jpeg decoder with PyPy and the three different ones I
On Thu, 14 Jan 2016 11:40 am, Bernardo Sulzbach wrote:
> On Wed, Jan 13, 2016 at 10:10 PM, Steven D'Aprano
> wrote:
>> (...) 4.0 (assuming there is one)
>
> Isn't it just a matter of time? Do you think it is even possible not
> to have Python 4 eventually?
3.9 is probably five or six years awa
On Wednesday, January 13, 2016 at 6:11:06 PM UTC-6, Steven D'Aprano wrote:
> But [GvR] has definitely ruled that 4.0 (assuming there is
> one) will not be a major backwards-incompatible version
> like 3.0 was.
Well for the sake of Python's future, let's all hope so!
I typically don't give much we
On 13/01/2016 07:30, Steven D'Aprano wrote:
Quote:
With the end of support for Python 2 on the horizon (in 2020),
many package developers have made their packages compatible
with both Python 2 and Python 3 by using constructs such as:
if sys.version_info[0] == 2:
On 01/13/2016 05:47 PM, Steven D'Aprano wrote:
> What of the poor souls who, for whatever reason, can't use NoScript?
>
> What about those who are so frustrated with trying to get sites to work that
> they just Allow All On This Page? I've seen websites that rely on anything
> up to forty or fifty
On 1/13/2016 7:10 PM, Steven D'Aprano wrote:
On Thu, 14 Jan 2016 03:25 am, Random832 wrote:
On Wed, Jan 13, 2016, at 09:21, sjms...@gmail.com wrote:
This strikes me as very good advice. Thanks for being so far-sighted.
And let's hope that Python 4 has fewer incompatibilities (none would
good)
Terry Reedy at 2016/1/13 UTC+8 5:15:20PM wrote:
> This was a Windows specific problem that was fixed (for me) in all three
> recent (last November/December) bugfix releases. If you have a problem
> with *current* IDLE, I would like to know.
I download/install the latest version 3.4.4 and it wor
On Thu, 14 Jan 2016 11:27 am, Chris Angelico wrote:
> On Thu, Jan 14, 2016 at 11:17 AM, Ian Kelly wrote:
>> I realize that I'm taking this thread off-topic, but yes it's
>> important that the form itself be downloaded over a secure connection.
>> If I can MitM the form response over an insecure
On Wed, Jan 13, 2016 at 10:10 PM, Steven D'Aprano wrote:
> (...) 4.0 (assuming there is one)
Isn't it just a matter of time? Do you think it is even possible not
to have Python 4 eventually?
--
Bernardo Sulzbach
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, 14 Jan 2016 11:17 am, Ian Kelly wrote:
> On Wed, Jan 13, 2016 at 3:19 AM, Chris Angelico wrote:
>> You're quite probably right that obfuscating the display is security
>> theatre; but it's the security theatre that people are expecting. If
>> you're about to enter your credit card details
On Thu, 14 Jan 2016 08:41 am, David H. Lipman wrote:
> From: "Laura Creighton"
>
>>
>> I fell recently. Ought to be nothing, but a small chip of bone, either
>> an
>
> Due to the side-effects of the prescription drugs you were given, I
> suggest
> you not use a computer until you are no longer
On Thu, 14 Jan 2016 07:47 am, Laura Creighton wrote:
>
> I fell recently. Ought to be nothing, [...]
Ouch! Much ouch!
Hope you get well soon Laura! My best wishes and sympathies to you!
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Jan 14, 2016 at 11:17 AM, Ian Kelly wrote:
> On Wed, Jan 13, 2016 at 3:19 AM, Chris Angelico wrote:
>> You're quite probably right that obfuscating the display is security
>> theatre; but it's the security theatre that people are expecting. If
>> you're about to enter your credit card det
On Wed, Jan 13, 2016 at 3:19 AM, Chris Angelico wrote:
> You're quite probably right that obfuscating the display is security
> theatre; but it's the security theatre that people are expecting. If
> you're about to enter your credit card details into a web form, does
> it really matter whether or
On Thu, 14 Jan 2016 03:25 am, Random832 wrote:
> On Wed, Jan 13, 2016, at 09:21, sjms...@gmail.com wrote:
>> This strikes me as very good advice. Thanks for being so far-sighted.
>> And let's hope that Python 4 has fewer incompatibilities (none would
>> good) than Python 3!
>
> Who says there's
On 1/13/2016 10:23 AM, Eddy Quicksall wrote:
What list do I use for building issues? I'm building 3.5.1.
Start here.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
In a message of Wed, 13 Jan 2016 16:41:57 -0500, "David H. Lipman" writes:
>From: "Laura Creighton"
>
>>
>> I fell recently. Ought to be nothing, but a small chip of bone, either an
>
>Due to the side-effects of the prescription drugs you were given, I suggest
>you not use a computer until you a
On Wed, Jan 13, 2016 at 7:38 PM, Gregory Ewing
wrote:
> Steven D'Aprano wrote:
>>
>> Quote:
>>
>> if six.PY2:
>> # Python 2 code
>> elif six.PY3:
>> # Python 3 code
>>
>> In this case, no code will get executed on Python 4 at all!
>
>
> Which is good, be
From: "Laura Creighton"
I fell recently. Ought to be nothing, but a small chip of bone, either an
Due to the side-effects of the prescription drugs you were given, I suggest
you not use a computer until you are no longer taking them. ;-)
--
Dave
Multi-AV Scanning Tool - http://multi-av
Steven D'Aprano wrote:
Quote:
if six.PY2:
# Python 2 code
elif six.PY3:
# Python 3 code
In this case, no code will get executed on Python 4 at all!
Which is good, because if no code is executed, it can't exhibit
any bugs.
Everyone should write thei
I fell recently. Ought to be nothing, but a small chip of bone, either an
existing one or one I just made is nicely wedged in the joint taking away
a whole lot of the ability of my arm to rotate in the elbow joint. Or
hold my arm in a position that is usual for typing. Plus, now that the
sprai
On 13.01.2016 12:20, Cem Karan wrote:
On Jan 12, 2016, at 11:18 AM, "Sven R. Kunze" wrote:
Thanks for replying here. I've come across these types of
wrappers/re-implementations of heapq as well when researching this issue. :)
Unfortunately, they don't solve the underlying issue at hand which
I want to create notification box using python just like I get when battery is
running low or something similar. I can do it using libnotify in linux, but I
cant figure out how to do it in windows. I got some codes on internet for this
like:
https://gist.github.com/wontoncc/1808234, however it d
On Thu, Jan 14, 2016 at 3:40 AM, Robin Becker wrote:
> is this true? I looked at https://wiki.python.org/moin/TimeComplexity and it
> says that dict.get which I assume is used for accessing the heapq delete
> point can be large (the average time is O(1), but amortized over a lot of
> accesses can
On 13/01/2016 15:34, srinivas devaki wrote:
On Wed, Jan 13, 2016 at 4:50 PM, Cem Karan wrote:
Is that so? I'll be honest, I never tested its asymptotic performance, I just
assumed that he had a dict coupled with a heap somehow, but I never looked into
the code.
I have just tested the cod
On Thu, Jan 14, 2016 at 3:25 AM, Random832 wrote:
> On Wed, Jan 13, 2016, at 09:21, sjms...@gmail.com wrote:
>> This strikes me as very good advice. Thanks for being so far-sighted.
>> And let's hope that Python 4 has fewer incompatibilities (none would
>> good) than Python 3!
>
> Who says there'
Guess you (Rodrigo) wanted to send this to the list?
On Wed, Jan 13, 2016 at 8:22 PM, Rodrigo Bistolfi wrote:
> Start by using just functions. As you move forward, you will find that
> often you are passing the same data structure as first argument to some
> functions. At that point, you a
On Wed, Jan 13, 2016, at 09:21, sjms...@gmail.com wrote:
> This strikes me as very good advice. Thanks for being so far-sighted.
> And let's hope that Python 4 has fewer incompatibilities (none would
> good) than Python 3!
Who says there's going to be a Python 4? I always assumed 3.9 would be
fol
On 2016-01-13, Steven D'Aprano wrote:
> Probably the best solution, because it will conveniently raise an exception
> if your assumption that the dict has exactly one item is wrong:
>
> item, = d.values() # Note the comma after "item".
[...]
> but you can unpack a sequence of one item too. If y
On Thu, 14 Jan 2016 02:23 am, Eddy Quicksall wrote:
> What list do I use for building issues? I'm building 3.5.1.
You can ask here.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Jan 12, 2016 at 11:29 PM, Steven D'Aprano wrote:
> On Wed, 13 Jan 2016 06:12 am, Bernardo Sulzbach wrote:
>
>> I saw it in another answer. next(iter(d)) is still the winner.
>
> Except that doesn't return the *value*, it returns the *key*.
>
There is a typo, sorry. I assume that what is p
On Jan 13, 2016 10:25 PM, "Tim Golden" wrote:
>
> On 13/01/2016 14:43, Joel Goldstick wrote:
> > On Wed, Jan 13, 2016 at 8:37 AM, Chris Angelico
wrote:
> >
> >> On Thu, Jan 14, 2016 at 12:28 AM, wrote:
> >>> please kindly inbox me the solution
> >>>
> >>> thanks in anticipation of your kind ges
What list do I use for building issues? I'm building 3.5.1.
Eddy
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Jan 13, 2016 at 4:50 PM, Cem Karan wrote:
>
> Is that so? I'll be honest, I never tested its asymptotic performance, I
> just assumed that he had a dict coupled with a heap somehow, but I never
> looked into the code.
>
I have just tested the code, the aymptotic performance is O(log(n)
On 13/01/2016 14:43, Joel Goldstick wrote:
> On Wed, Jan 13, 2016 at 8:37 AM, Chris Angelico wrote:
>
>> On Thu, Jan 14, 2016 at 12:28 AM, wrote:
>>> please kindly inbox me the solution
>>>
>>> thanks in anticipation of your kind gesture
>>>
>>>
>>> sammhielade...@gmail.com
>>
>> Don't you get
On Wed, Jan 13, 2016 at 8:37 AM, Chris Angelico wrote:
> On Thu, Jan 14, 2016 at 12:28 AM, wrote:
> > please kindly inbox me the solution
> >
> > thanks in anticipation of your kind gesture
> >
> >
> > sammhielade...@gmail.com
>
> Don't you get it? You are not going to be given the code. All yo
This strikes me as very good advice. Thanks for being so far-sighted. And
let's hope that Python 4 has fewer incompatibilities (none would good) than
Python 3!
Cheers,
Steve J. Martin
--
https://mail.python.org/mailman/listinfo/python-list
rt
--
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Jan 14, 2016 at 12:28 AM, wrote:
> please kindly inbox me the solution
>
> thanks in anticipation of your kind gesture
>
>
> sammhielade...@gmail.com
Don't you get it? You are not going to be given the code. All you're
doing is making us resent your presence, which means you're less
like
please kindly inbox me the solution
thanks in anticipation of your kind gesture
sammhielade...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list
please assist with the solution on this
p
h
a
t
s
a
m
m
hi
e
l...@gmail.com
thanks
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, 13 January 2016 13:23:04 UTC, Alan Robinson wrote:
> On Wednesday, 13 January 2016 13:06:11 UTC, Peter Otten wrote:
> > Alan Robinson wrote:
> >
> > > On Wednesday, 13 January 2016 12:32:51 UTC, Chris Angelico wrote:
> > >> On Wed, Jan 13, 2016 at 11:23 PM, Alan Robinson
> > >> w
On Wednesday, 13 January 2016 13:06:11 UTC, Peter Otten wrote:
> Alan Robinson wrote:
>
> > On Wednesday, 13 January 2016 12:32:51 UTC, Chris Angelico wrote:
> >> On Wed, Jan 13, 2016 at 11:23 PM, Alan Robinson
> >> wrote:
> >> > def menu():
> >> > option = int(input("Please select an optio
Alan Robinson wrote:
> On Wednesday, 13 January 2016 12:32:51 UTC, Chris Angelico wrote:
>> On Wed, Jan 13, 2016 at 11:23 PM, Alan Robinson
>> wrote:
>> > def menu():
>> > option = int(input("Please select an option: \n 1: Set Generation 0
>> > Values \n 2: View Generation 0 Values \n 3:
On Wed, Jan 13, 2016 at 11:54 PM, Alan Robinson
wrote:
> On Wednesday, 13 January 2016 12:32:51 UTC, Chris Angelico wrote:
>> On Wed, Jan 13, 2016 at 11:23 PM, Alan Robinson
>> wrote:
>> > def menu():
>> > option = int(input("Please select an option: \n 1: Set Generation 0
>> > Values \n 2:
On Wednesday, 13 January 2016 12:32:51 UTC, Chris Angelico wrote:
> On Wed, Jan 13, 2016 at 11:23 PM, Alan Robinson
> wrote:
> > def menu():
> > option = int(input("Please select an option: \n 1: Set Generation 0
> > Values \n 2: View Generation 0 Values \n 3: Run Model \n 4: Print values"))
On Wed, Jan 13, 2016 at 11:23 PM, Alan Robinson
wrote:
> def menu():
> option = int(input("Please select an option: \n 1: Set Generation 0
> Values \n 2: View Generation 0 Values \n 3: Run Model \n 4: Print values"))
>
> if option == 1:
> juveniles,adults,seniles = setGen()
>
def menu():
option = int(input("Please select an option: \n 1: Set Generation 0 Values
\n 2: View Generation 0 Values \n 3: Run Model \n 4: Print values"))
if option == 1:
juveniles,adults,seniles = setGen()
elif option == 2:
displayGen()
elif option == 3:
On Wed, Jan 13, 2016 at 10:21 PM, Peter Otten <__pete...@web.de> wrote:
>> To set a multi-word value as an HTML attribute, you'll need to put
>> quotes around it. You might be able to get away with using %r instead
>> of %s, or even just "%s",
>
> That is bad advice that "works" until there is a va
Chris Angelico wrote:
> On Wed, Jan 13, 2016 at 12:52 PM, wrote:
>> If i change the value from origin to origin energy and save - the value
>> updated to the database is correct but when the page is re displayed it
>> only shows origin in the text field - as if it ignores everything after
>> the
On Jan 12, 2016, at 11:18 AM, "Sven R. Kunze" wrote:
> On 12.01.2016 03:48, Cem Karan wrote:
>>
>> Jumping in late, but...
>>
>> If you want something that 'just works', you can use HeapDict:
>>
>> http://stutzbachenterprises.com/
>>
>> I've used it in the past, and it works quite well. I h
On Saturday, December 12, 2015 at 12:05:29 PM UTC+3, Harbey Leke wrote:
> Create a class called BankAccount
>
> .Create a constructor that takes in an integer and assigns this to a
> `balance` property.
>
> .Create a method called `deposit` that takes in cash deposit amount and
> updates the ba
On Wed, Jan 13, 2016 at 8:05 PM, Terry Reedy wrote:
> Assuming that sys.__sydout__ is not None is a bug on pip's part. Perhaps you
> could report it to it list or tracker, and point Donald and whoever to
> https://docs.python.org/3/library/sys.html#sys.__stdin__
>
> "Note
>
> Under some conditions
On Wed, Jan 13, 2016 at 3:58 AM, Tim Golden wrote:
> On 13/01/2016 05:57, ifeanyioprah--- via Python-list wrote:
>
> [... snip yet another homework dump with one more still held in
> moderation ...]
>
> At this point you're basically spamming this list. I won't allow any
> more of your posts thro
On 1/12/2016 8:20 PM, jf...@ms4.hinet.net wrote:
Terry Reedy at 2016/1/12 UTC+8 3:56:03PM wrote:
Revamping IDLE to 1. use ttk widgets and 2. become a modern single
window app with multiple panes, including a tabbed editor pane, is
a goal for 2016.
That will be great, I'm looking forward to it.
On 1/12/2016 5:18 AM, Chris Angelico wrote:
On Tue, Jan 12, 2016 at 7:27 PM, Terry Reedy wrote:
Can psycopg2 be installed with pip? There is an issue (#23551) to make a
pip GUI and make it accessible from IDLE. We need someone with both pip and
tkinter knowledge to either design and write i
On 13/01/2016 05:57, ifeanyioprah--- via Python-list wrote:
[... snip yet another homework dump with one more still held in
moderation ...]
At this point you're basically spamming this list. I won't allow any
more of your posts through unless they appear to be engaging with the
help shown to you
Create a class called BankAccount
Create a constructor that takes in an integer and assigns this to a `balance`
property.
Create a method called `deposit` that takes in cash deposit amount and updates
the balance accordingly.
Create a method called `withdraw` that takes in cash withdrawal
Dear list members!
I have written I small python script for twitter mining utilising the
'tweepy' library. Since a couple of days I cannot use the script
anymore, due to a "ssl certificate verification failed" error. The
authentication with Twitter API succeess, but when I try to run the
foll
75 matches
Mail list logo