Coverage for aiocoap/util/asyncio/__init__.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

6 statements  

1# This file is part of the Python aiocoap library project. 

2# 

3# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>, 

4# 2013-2014 Christian Amsüss <c.amsuess@energyharvesting.at> 

5# 

6# aiocoap is free software, this file is published under the MIT license as 

7# described in the accompanying LICENSE file. 

8 

9"""Extensions to asyncio and workarounds around its shortcomings""" 

10 

11import sys 

12 

13def py38args(**kwargs): 

14 """Wrapper around kwargs that replaces them with an empty list for Python 

15 versions earlier than 3.8. 

16 

17 This is used to assign a name in asyncio.create_task to pass in a name.""" 

18 if sys.version_info >= (3, 8): 

19 return kwargs 

20 else: 

21 return {}