Thanks, ChrisA
On Tue, Nov 22, 2016 at 9:24 PM, Chris Angelico wrote:
> On Wed, Nov 23, 2016 at 2:14 PM, Nathan Ernst
> wrote:
> > I was not aware of that PEP.
> >
> > The logic in my function is exactly as desired, so to squelch the
> warning,
> > I merely wrapped the iteration in a try/except
On Wed, Nov 23, 2016 at 2:14 PM, Nathan Ernst wrote:
> I was not aware of that PEP.
>
> The logic in my function is exactly as desired, so to squelch the warning,
> I merely wrapped the iteration in a try/except:
>
> def adjacent_difference(seq, selector=identity):
> i = iter(seq)
> l = select
On Wed, Nov 23, 2016 at 1:50 PM, Nathan Ernst wrote:
> I'm using Python 3.5.2, and the following code (when invoked) causes a
> PendingDeprecationWarning when used in a unit test:
>
> def identity(x):
> return x
>
> def adjacent_difference(seq, selector=identity):
> i = iter(seq)
> l = selec
Thanks,
I was not aware of that PEP.
The logic in my function is exactly as desired, so to squelch the warning,
I merely wrapped the iteration in a try/except:
def adjacent_difference(seq, selector=identity):
i = iter(seq)
l = selector(next(i))
try:
while True:
r = selector(next(
On 2016-11-23 02:50, Nathan Ernst wrote:
I'm using Python 3.5.2, and the following code (when invoked) causes a
PendingDeprecationWarning when used in a unit test:
def identity(x):
return x
def adjacent_difference(seq, selector=identity):
i = iter(seq)
l = selector(next(i))
while True:
I'm using Python 3.5.2, and the following code (when invoked) causes a
PendingDeprecationWarning when used in a unit test:
def identity(x):
return x
def adjacent_difference(seq, selector=identity):
i = iter(seq)
l = selector(next(i))
while True:
r = selector(next(i))
yield r - l