Did I find the right examples for you? yes no

util.nextinseq

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)
```[0, 1, 3] -> 2
[0, 'asdf', '3', 5] -> 1
```

```        def nextinseq(seq, start=0):
''' [0, 1, 3] -> 2
[0, 'asdf', '3', 5] -> 1
'''

seq = map(onlyint, seq)
seq = filter(lambda x: x != None, seq)

if not seq: return start
if len(seq) == 1: return seq[0] + 1

i=0; j=0

for i, j in pairwise(seq):
if (j-i) > 1: return i + 1
else:
return j + 1
```

```from os import unlink, makedirs
from os.path import basename, join as pjoin, exists, isdir
from util import nextinseq, splitkey, joinkey

```
```    def addkey(self, user, data):
nums = [i[1] for i in self.listkeys(user, True)]
next = nextinseq(nums)

fn = pjoin(self.keydir, joinkey(user, next))
```

```
from os.path import basename, join as pjoin
from util import nextinseq, splitkey, joinkey

```
```    def addkey(self, user, data):
nums = [i[1] for i in self.listkeys(user, True)]
next = nextinseq(nums)

fn = pjoin(self.keydir, joinkey(user, next))
```

```from os import unlink, makedirs
from os.path import basename, join as pjoin, exists, isdir
from util import nextinseq, splitkey, joinkey

```
```    def addkey(self, user, data):
nums = [i[1] for i in self.listkeys(user, True)]
next = nextinseq(nums)

fn = pjoin(self.keydir, joinkey(user, next))
```

```
from os.path import basename, join as pjoin
from util import nextinseq, splitkey, joinkey

```
```    def addkey(self, user, data):
nums = [i[1] for i in self.listkeys(user, True)]
next = nextinseq(nums)

fn = pjoin(self.keydir, joinkey(user, next))
```