Re: [Tutor] Variable reference

2015-07-07 Thread Steven D'Aprano
On Tue, Jul 07, 2015 at 06:50:25PM +0200, Peter Otten wrote: [...] > > Not so. The point of del being a statement is that it should be > > considered an operation on the *reference*, not the *value* of the > > reference. So: > > > > x = 23 > > delete(x) # if it existed, it would see the value 23

Re: [Tutor] Variable reference

2015-07-07 Thread Danny Yoo
>> It's a work-around for the fact that >> Python doesn't have dedicated syntax to say "operate on the reference >> foo" rather than the value of foo. > > I think Danny's point was that you should not micromanage name bindings at > all. Then Alan added that del is useful for dicts etc. on which I r

Re: [Tutor] Variable reference

2015-07-07 Thread Peter Otten
Steven D'Aprano wrote: > On Tue, Jul 07, 2015 at 04:08:30PM +0200, Peter Otten wrote: > >> For dicts and lists a method would work as well. Even now you can write >> >> items.pop(index) # instead of del items[index] >> lookup.pop(key) # del lookup[key] >> >> If you find the name pop() random or

Re: [Tutor] Variable reference

2015-07-07 Thread Steven D'Aprano
On Tue, Jul 07, 2015 at 04:08:30PM +0200, Peter Otten wrote: > For dicts and lists a method would work as well. Even now you can write > > items.pop(index) # instead of del items[index] > lookup.pop(key) # del lookup[key] > > If you find the name pop() random or hard to discover a delete() metho

Re: [Tutor] Variable reference

2015-07-07 Thread Peter Otten
Alan Gauld wrote: > On 07/07/15 01:18, Danny Yoo wrote: >> I'd also add that the 'del' statement has near-zero utility. >> >> 'del' is a language blemish. It should not be used by beginners, >> because it asks them to try to manually manage the lifetime of their >> variable names. That's an unre

Re: [Tutor] Pytest help :p:

2015-07-07 Thread Thomas C. Hicks
On 07/07/2015 06:58 PM, Alan Gauld wrote: The best place to ask for help on any 3rd party package is on the package's own support forum/list. Py.test has several options: https://pytest.org/latest/contact.html The Testing In Python mailing

Re: [Tutor] Pytest help

2015-07-07 Thread Alan Gauld
On 07/07/15 03:16, Sahil Chauhan wrote: Hi, I am trying to use py.test for writing some selenium webdriver tests. I wrote my first test and pytest is deselecting that test even though I didn't mark any test. How can I resolve this issue? Is there some default setting used by py.test, The be

Re: [Tutor] Pytest help

2015-07-07 Thread Mark Lawrence
On 07/07/2015 03:16, Sahil Chauhan wrote: Hi, I am trying to use py.test for writing some selenium webdriver tests. I wrote my first test and pytest is deselecting that test even though I didn't mark any test. How can I resolve this issue? Is there some default setting used by py.test, (qa)Ma

Re: [Tutor] Pytest help

2015-07-07 Thread Oscar Benjamin
On Tue, 7 Jul 2015 at 09:51 Sahil Chauhan wrote: > Hi, > > I am trying to use py.test for writing some selenium webdriver tests. I > wrote my first test and > pytest is deselecting that test even though I didn't mark any test. > > How can I resolve this issue? Is there some default setting used

[Tutor] Pytest help

2015-07-07 Thread Sahil Chauhan
Hi, I am trying to use py.test for writing some selenium webdriver tests. I wrote my first test and pytest is deselecting that test even though I didn't mark any test. How can I resolve this issue? Is there some default setting used by py.test, (qa)MacBook-Air:$ py.test tests/test_login.py ==