Re: Stop writing Python 3.5 incompatible code :-)

2016-01-13 Thread Frank Millman
"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

Re: Stop writing Python 3.5 incompatible code :-)

2016-01-13 Thread Chris Angelico
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

Re: [Python-ideas] Password masking for getpass.getpass

2016-01-13 Thread Marko Rauhamaa
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

Re: When I need classes?

2016-01-13 Thread Mike S via Python-list
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

Stop writing Python 3.5 incompatible code :-)

2016-01-13 Thread Frank Millman
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Terry Reedy
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Michael Torrie
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Rick Johnson
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Chris Angelico
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Gene Heskett
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: > >>> (...)

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Rick Johnson
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

Re: me, my arm, my availability ...

2016-01-13 Thread Joel Goldstick
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Michael Torrie
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread BartC
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Chris Angelico
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Michael Torrie
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Chris Angelico
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Steven D'Aprano
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Rick Johnson
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread BartC
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:

Re: [Python-ideas] Password masking for getpass.getpass

2016-01-13 Thread Michael Torrie
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Terry Reedy
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)

Re: Which Python editor has this feature?

2016-01-13 Thread jfong
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

Re: [Python-ideas] Password masking for getpass.getpass

2016-01-13 Thread Steven D'Aprano
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Bernardo Sulzbach
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

Re: [Python-ideas] Password masking for getpass.getpass

2016-01-13 Thread Steven D'Aprano
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

Re: me, my arm, my availability ...

2016-01-13 Thread Steven D'Aprano
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

Re: me, my arm, my availability ...

2016-01-13 Thread Steven D'Aprano
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

Re: [Python-ideas] Password masking for getpass.getpass

2016-01-13 Thread Chris Angelico
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

Re: [Python-ideas] Password masking for getpass.getpass

2016-01-13 Thread Ian Kelly
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Steven D'Aprano
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

Re: Building list

2016-01-13 Thread Terry Reedy
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

Re: me, my arm, my availability ...

2016-01-13 Thread Laura Creighton
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Bernardo Sulzbach
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

Re: me, my arm, my availability ...

2016-01-13 Thread David H. Lipman
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Gregory Ewing
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

me, my arm, my availability ...

2016-01-13 Thread Laura Creighton
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

Re: How to remove item from heap efficiently?

2016-01-13 Thread Sven R. Kunze
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

Create notifications in python

2016-01-13 Thread Shiva Upreti
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

Re: How to remove item from heap efficiently?

2016-01-13 Thread Chris Angelico
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

Re: How to remove item from heap efficiently?

2016-01-13 Thread Robin Becker
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Chris Angelico
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'

Re: When I need classes?

2016-01-13 Thread Rustom Mody
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread Random832
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

Re: subscripting Python 3 dicts/getting the only value in a Python 3 dict

2016-01-13 Thread Grant Edwards
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

Re: Building list

2016-01-13 Thread Steven D'Aprano
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

Re: subscripting Python 3 dicts/getting the only value in a Python 3 dict

2016-01-13 Thread Bernardo Sulzbach
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

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-13 Thread Andrew Ongko
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

Building list

2016-01-13 Thread Eddy Quicksall
What list do I use for building issues? I'm building 3.5.1. Eddy -- https://mail.python.org/mailman/listinfo/python-list

Re: How to remove item from heap efficiently?

2016-01-13 Thread srinivas devaki
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)

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-13 Thread Tim Golden
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

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-13 Thread Joel Goldstick
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

Re: Stop writing Python 4 incompatible code

2016-01-13 Thread sjmsoft
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

45

2016-01-13 Thread Hongyi Zhao
rt -- .: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :. -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-13 Thread Chris Angelico
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

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-13 Thread phatsammhiel
please kindly inbox me the solution thanks in anticipation of your kind gesture sammhielade...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-13 Thread phatsammhiel
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

Re: local variable 'juveniles' referenced before assignment

2016-01-13 Thread Alan Robinson
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

Re: local variable 'juveniles' referenced before assignment

2016-01-13 Thread Alan Robinson
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

Re: local variable 'juveniles' referenced before assignment

2016-01-13 Thread Peter Otten
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:

Re: local variable 'juveniles' referenced before assignment

2016-01-13 Thread Chris Angelico
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:

Re: local variable 'juveniles' referenced before assignment

2016-01-13 Thread Alan Robinson
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"))

Re: local variable 'juveniles' referenced before assignment

2016-01-13 Thread Chris Angelico
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() >

local variable 'juveniles' referenced before assignment

2016-01-13 Thread Alan Robinson
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:

Re: Data Entry

2016-01-13 Thread Chris Angelico
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

Re: Data Entry

2016-01-13 Thread Peter Otten
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

Re: How to remove item from heap efficiently?

2016-01-13 Thread Cem Karan
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

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-13 Thread bonfaceo3
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

Re: Which Python editor has this feature?

2016-01-13 Thread Chris Angelico
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

Re: Need solution with this problem

2016-01-13 Thread Joel Goldstick
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

Re: Which Python editor has this feature?

2016-01-13 Thread Terry Reedy
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.

Re: Which Python editor has this feature?

2016-01-13 Thread Terry Reedy
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

Re: Need solution with this problem

2016-01-13 Thread Tim Golden
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

Need solution with this problem

2016-01-13 Thread ifeanyioprah--- via Python-list
Create a class called BankAccount­ Create a constructor that takes in an in­teger and assigns this to a `balance` pr­operty. Create a method called `deposit` that ta­kes in cash deposit amount and updates t­he balance accordingly. Create a method called `withdraw` that t­akes in cash withdrawal

SSL certification fails / tweepy

2016-01-13 Thread K. Elo
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