Re: condition.acquire vs lock.acquire

2018-03-27 Thread dieter
jayshankar nair via Python-list writes: > Is condition.acquire(threading.Condition()) similar to > lock.acquire(threading.Lock). Does both of get access to the lock. Can i use > condition.wait,notify with lock.acquire or i have to use condition.wait, > notify with condition.acquire. > cond.acqu

Re: please test the new PyPI (now in beta)

2018-03-27 Thread dieter
Tim Golden writes: > ... > In either case, talking about it > here seems fruitless. Someone asked for feedback here. At least he should look for it here. -- https://mail.python.org/mailman/listinfo/python-list

Re: Pep8 for long pattern

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 9:37:14 PM UTC-5, Dan Stromberg wrote: > I can easily get 132+ columns of a font large enough for my > 52 year old eyes on a 15" laptop. Well, if you're comfortable with the long lines, fine. But be aware that long lines are poo-pooed in most professional enviroments.

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Wed, Mar 28, 2018 at 1:22 PM, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 6:55:23 PM UTC-5, Steven D'Aprano wrote: >> On Tue, 27 Mar 2018 09:28:34 -0700, Rick Johnson wrote: > [...] >> > Since when did utilizing a method to request a specific >> > value become some sort of magic? >> >>

Re: Pep8 for long pattern

2018-03-27 Thread Dan Stromberg
On Tue, Mar 27, 2018 at 4:37 PM, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 4:02:37 PM UTC-5, Dan Stromberg wrote: >> On Tue, Mar 27, 2018 at 8:18 AM, Michael Torrie wrote: >> > But when it's exactly what you need, why do you need to >> > shoehorn the expression into 79 characters? Seem

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 6:55:23 PM UTC-5, Steven D'Aprano wrote: > On Tue, 27 Mar 2018 09:28:34 -0700, Rick Johnson wrote: [...] > > Since when did utilizing a method to request a specific > > value become some sort of magic? > > Since it requires a special method that has super powers no > m

Re: Welcome to the "Python-list" mailing list

2018-03-27 Thread Terry Reedy
On 3/27/2018 11:06 AM, nadir musallam wrote: I have tried installing Python3.6.4 on my computer as I am eager to begin a What exactly did you do? new career in data analytics. However I am running in to some problems when attempting to set up the software. I have downloaded Dev C++ software a

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 09:28:34 -0700, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 8:46:54 AM UTC-5, Chris Angelico wrote: [...] > > Cool, so Greg was right: you can't get a reference to a method or > > function. You need magic to simulate it. > > Since when did utilizing a method to request a

Re: Pep8 for long pattern

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 4:02:37 PM UTC-5, Dan Stromberg wrote: > On Tue, Mar 27, 2018 at 8:18 AM, Michael Torrie wrote: > > But when it's exactly what you need, why do you need to > > shoehorn the expression into 79 characters? Seems > > pointless in a case like this. PEP8 is a guideline, n

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 4:47:05 PM UTC-5, Gregory Ewing wrote: > Rick Johnson wrote: > > rb> Object.method("print_name").call("Meathead") > > Yes, but the point is that you have to have to use a different > syntax to call it. This is like having to say > > f.__call__(arg) > > in Pytho

Re: Welcome to the "Python-list" mailing list

2018-03-27 Thread nadir musallam
Dear All, Kind reminder on the below please, if there is a separate mailing list for installation problems I’d appreciate if you’d let me know. Warm regards, Nadir Sent from my iPhone On Mar 26, 2018, at 8:40 PM, nadir musallam mailto:nadir_musal...@hotmail.com>> wrote: Dear All, I have

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Ian Kelly
On Mon, Mar 26, 2018 at 4:16 PM, Sumana Harihareswara wrote: > The new Python Package Index at https://pypi.org is now in beta. > > This means the site is robust, but we anticipate needing more user > testing and changes before it is "production-ready" and can fully > replace https://pypi.python.

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Gregory Ewing
Paul Moore wrote: maybe a less technical term[1] like "filters" would help here? Categories? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Gregory Ewing
Rick Johnson wrote: rb> Object.method("print_name").call("Meathead") Yes, but the point is that you have to have to use a different syntax to call it. This is like having to say f.__call__(arg) in Python instead of just f(arg) -- Greg -- https://mail.python.org/mailman/listinfo/py

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Gregory Ewing
Chris Angelico wrote: Ahh, that explains it. Great. So how do you build higher-order functions? Or don't you? You don't, exactly. You have to pass around objects with a method to invoke when you want to "call" them. Ruby has a code-block syntax that helps with this somewhat, but I don't think

Re: Pep8 for long pattern

2018-03-27 Thread Dan Stromberg
On Tue, Mar 27, 2018 at 8:18 AM, Michael Torrie wrote: > But when it's exactly what you need, why do > you need to shoehorn the expression into 79 characters? Seems pointless > in a case like this. PEP8 is a guideline, not an absolute rule. It's > okay to bend it a bit in cases like this. I thi

testfixtures 6.0.0 released!

2018-03-27 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 6.0.0 featuring the following: * |compare()| will now handle objects that do not natively support equality or inequality and will treat these objec

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 11:35:31 AM UTC-5, Chris Angelico wrote: > Why are you suggesting that this is magic? _You_ are the one who leveled the accusation that Ruby's methodology for fetching a function reference (a la): Object.method(meth-name-here) is "magic". I'm merely requesting t

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Wed, Mar 28, 2018 at 3:28 AM, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 8:46:54 AM UTC-5, Chris Angelico wrote: > [...] >> Cool, so Greg was right: you can't get a reference to a >> method or function. You need magic to simulate it. > > Since when did utilizing a method to request a s

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 8:46:54 AM UTC-5, Chris Angelico wrote: [...] > Cool, so Greg was right: you can't get a reference to a > method or function. You need magic to simulate it. Since when did utilizing a method to request a specific value become some sort of magic? Do you consider this

Re:

2018-03-27 Thread Dan Stromberg
Please at least skim http://www.catb.org/esr/faqs/smart-questions.html On Tue, Mar 27, 2018 at 12:27 AM, kevon harris wrote: > Unable to pull up IDLE after downloading Python 3.6.4 -- https://mail.python.org/mailman/listinfo/python-list

Re: String Formatting with new .format()

2018-03-27 Thread Michael Torrie
On 03/26/2018 09:37 AM, Ganesh Pal wrote: > Hi Team, > > Just a quick suggestion, on string formatting with .format() which of the > below is better , given both give the same result . No they don't. Look more closely at the output. attempts = 1 msg2 = "Hello" print "Retry attempt

Re: Pep8 for long pattern

2018-03-27 Thread Michael Torrie
On 03/27/2018 08:17 AM, Ganesh Pal wrote: > Hello Python friends, > > How do I split the below regex , so that it fits within the character > limit of 79 words > > > pattern = [ > r'(?P([0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))', > > r'(?P(owner:\s+[0-9a-fA-F]+:

Re: To super or not to super (Re: Accessing parent objects)

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 19:21:38 +1300, Gregory Ewing wrote: > The idea that super() is *always* the right way to call inherited > methods in a multiple inheritance environment seems to have been raised > by some people to the level of religous dogma. "Always"? Well, you could always avoid super() b

Re: (unknown)

2018-03-27 Thread Grant Edwards
On 2018-03-27, kevon harris wrote: > Unable to pull up IDLE after downloading Python 3.6.4 Ah. What happens when you push down instead of pull up? > Sent from Mail for Windows 10 Sent from mutt for Gentoo Linux -- https://mail.python.org/mailman/listinfo/python-list

Re: To super or not to super (Re: Accessing parent objects)

2018-03-27 Thread Ian Kelly
On Tue, Mar 27, 2018 at 8:47 AM, Ian Kelly wrote: > On Tue, Mar 27, 2018 at 12:21 AM, Gregory Ewing > wrote: >> The trouble is, those conditions don't always hold. >> Often when overriding a method, you want to do something >> *instead* of what the base method does. > > As noted above, unless the

Re: To super or not to super (Re: Accessing parent objects)

2018-03-27 Thread Ian Kelly
On Tue, Mar 27, 2018 at 12:21 AM, Gregory Ewing wrote: > The idea that super() is *always* the right way to call > inherited methods in a multiple inheritance environment > seems to have been raised by some people to the level > of religous dogma. > > I don't buy it. In order for it to work, the f

Re: Pep8 for long pattern

2018-03-27 Thread Serhiy Storchaka
27.03.18 17:17, Ganesh Pal пише: How do I split the below regex , so that it fits within the character limit of 79 words pattern = [ r'(?P([0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))', r'(?P(owner:\s+[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]

Re: Pep8 for long pattern

2018-03-27 Thread Paul Moore
Use re.X - see https://docs.python.org/3.6/library/re.html#re.X for details. On 27 March 2018 at 15:17, Ganesh Pal wrote: > Hello Python friends, > > How do I split the below regex , so that it fits within the character > limit of 79 words > > > pattern = [ > r'(?P([0-9a-fA-F]+:[0-9a-fA-F]+:[0-

Pep8 for long pattern

2018-03-27 Thread Ganesh Pal
Hello Python friends, How do I split the below regex , so that it fits within the character limit of 79 words pattern = [ r'(?P([0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))', r'(?P(owner:\s+[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))',

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Bill Deegan
The back ground blue on the pypi page is the highlight blue on the python.org page, they should change the color to match to background python.org color. -Bill On Tue, Mar 27, 2018 at 7:50 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Tue, 27 Mar 2018 22:25:44 +1100,

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Chris Angelico
On Tue, Mar 27, 2018 at 10:50 PM, Steven D'Aprano wrote: > On Tue, 27 Mar 2018 22:25:44 +1100, Chris Angelico wrote: > >> On Tue, Mar 27, 2018 at 9:49 PM, Steven D'Aprano >> wrote: >>> As an extra bonus, even when searching is not reliant on Javascript, >>> mangling the text in the search box oft

Re: (unknown)

2018-03-27 Thread Terry Reedy
On 3/27/2018 3:27 AM, kevon harris wrote: Unable to pull up IDLE after downloading Python 3.6.4 What did you download? How did you install after downloading? Can you run 3.6 after installing? How did you try to run IDLE? Can you use Command Prompt? -- Terry Jan Reedy -- https://mail.python.or

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Tue, Mar 27, 2018 at 11:00 PM, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 1:55:01 AM UTC-5, Gregory Ewing wrote: >> Chris Angelico wrote: >> > Question: How do you get a reference to a Ruby function? Or are they >> > not first-class objects? >> >> They're not first-class. So, you can't

Re: String Formatting with new .format()

2018-03-27 Thread Ganesh Pal
> > > Or maybe they're not giving the same result. I'm a little confused here. > > Thanks Chris, for the reply they appear to give the same result . -- https://mail.python.org/mailman/listinfo/python-list

Re: (no subject)

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 7:19:53 AM UTC-5, kevon harris wrote: > Unable to pull up IDLE after downloading Python 3.6.4 > > Sent from Mail for Windows 10 What OS? On Windows running Python2.X, IDLE is located @ '/Python2X/Lib/idlelib/idle.pyw' -- https://mail.python.org/mailman/listinfo/pyt

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 3:24:48 AM UTC-5, Steven D'Aprano wrote: > On Mon, 26 Mar 2018 11:37:35 -0700, Rick Johnson wrote: > Printing a string and calling a function is obfuscated code? Deary me. When the programmer can't be bothered to invent names more descriptive than `a` and `b`, why ye

condition.acquire vs lock.acquire

2018-03-27 Thread jayshankar nair via Python-list
Hi, Is condition.acquire(threading.Condition()) similar to lock.acquire(threading.Lock). Does both of get access to the lock. Can i use condition.wait,notify with lock.acquire or i have to use condition.wait, notify with condition.acquire. cond.acquire()  // can i replace with lock.acquire    w

[no subject]

2018-03-27 Thread kevon harris
Unable to pull up IDLE after downloading Python 3.6.4 Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 1:55:01 AM UTC-5, Gregory Ewing wrote: > Chris Angelico wrote: > > Question: How do you get a reference to a Ruby function? Or are they > > not first-class objects? > > They're not first-class. So, you can't. If Chris means: "how do you get a reference to a Ruby funct

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 22:25:44 +1100, Chris Angelico wrote: > On Tue, Mar 27, 2018 at 9:49 PM, Steven D'Aprano > wrote: >> As an extra bonus, even when searching is not reliant on Javascript, >> mangling the text in the search box often is, so unless I'm extra >> careful, whenever I want to search

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Chris Angelico
On Tue, Mar 27, 2018 at 9:49 PM, Steven D'Aprano wrote: > As an extra bonus, even when searching is not reliant on Javascript, > mangling the text in the search box often is, so unless I'm extra > careful, whenever I want to search for (say) "aardvarks", I invariably > end up searching for "searaa

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 11:03:00 +0100, Paul Moore wrote: > Digging into this further, the design work on the Warehouse site has > been ongoing since late 2015, and there was an extensive user testing > phase, Oh? What did they test the user for? Whatever it was, it was a pity they didn't test them

Re: To super or not to super (Re: Accessing parent objects)

2018-03-27 Thread Antoon Pardon
On 27-03-18 08:21, Gregory Ewing wrote: > The idea that super() is *always* the right way to call > inherited methods in a multiple inheritance environment > seems to have been raised by some people to the level > of religous dogma. > > I don't buy it. In order for it to work, the following > two c

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Wolfgang Maier
For me, that's a window width issue. The sidebar with the filters only shows when the window is wide enough. Unfortunately, the text mentioning it doesn't change, so this should be fixed. On 03/27/2018 12:06 PM, Steven D'Aprano wrote: On Tue, 27 Mar 2018 10:48:15 +0100, Paul Moore wrote: By

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Tim Golden
On 27/03/2018 11:06, Steven D'Aprano wrote: On Tue, 27 Mar 2018 10:48:15 +0100, Paul Moore wrote: By the way, on the search page: https://pypi.org/search/ it says "Enter a search query above, or select a filter from the list of classifiers on the left" but there is no such filter or list of

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 10:48:15 +0100, Paul Moore wrote: >> By the way, on the search page: >> >> https://pypi.org/search/ >> >> >> it says "Enter a search query above, or select a filter from the list >> of classifiers on the left" but there is no such filter or list of >> classifiers. > > Do you n

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Paul Moore
On 27 March 2018 at 10:48, Paul Moore wrote: > Same is true of your comment about the site design, > although I suspect it's a bit late for that to be changed in the > immediate future - the site design has been basically unchanged since > very early in the redesign. Personally, I agree it's a bit

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Paul Moore
On 27 March 2018 at 09:35, Steven D'Aprano wrote: > On Mon, 26 Mar 2018 18:16:26 -0400, Sumana Harihareswara wrote: > >> The new Python Package Index at https://pypi.org is now in beta. >> >> This means the site is robust, but we anticipate needing more user >> testing and changes before it is "pr

Re: Entering a very large number

2018-03-27 Thread Steven D'Aprano
On Mon, 26 Mar 2018 23:49:07 -0400, Richard Damon wrote: > The bigger issue is that these sort of micro-measurements aren't > actually that good at measuring real quantitative performance costs. > They can often give qualitative indications, but the way modern > computers work, processing environm

Re: please test the new PyPI (now in beta)

2018-03-27 Thread Steven D'Aprano
On Mon, 26 Mar 2018 18:16:26 -0400, Sumana Harihareswara wrote: > The new Python Package Index at https://pypi.org is now in beta. > > This means the site is robust, but we anticipate needing more user > testing and changes before it is "production-ready" and can fully > replace https://pypi.pyth

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Steven D'Aprano
On Mon, 26 Mar 2018 11:37:35 -0700, Rick Johnson wrote: > On Monday, March 26, 2018 at 5:46:03 AM UTC-5, Steven D'Aprano wrote: >> Rick, you're supposedly familiar with Ruby. And yet, you didn't notice >> that your supposed "fix" didn't touch any executable code, all it did >> was modify the strin

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Stephen Hansen
On Mon, Mar 26, 2018, at 2:19 PM, Rick Johnson wrote: >Sure, the behavior that Steven > uncovered is odd, but it could be that Maz harbors a strong > disliking for undisciplined pupils, and thus, he designed > and placed this little trap in the hopes the pain it induced > might encourage the petula

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Tue, Mar 27, 2018 at 5:54 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> Question: How do you get a reference to a Ruby function? Or are they >> not first-class objects? > > > They're not first-class. So, you can't. > Ahh, that explains it. Great. So how do you build higher-order funct