| Rev | Line | |
|---|
| [18251] | 1 | # -*- coding: utf-8 -*- |
|---|
| 2 | # |
|---|
| 3 | # Copyright (C) 2021 Cinc |
|---|
| 4 | # All rights reserved. |
|---|
| 5 | # |
|---|
| 6 | # This software is licensed as described in the file COPYING.txt, which |
|---|
| 7 | # you should have received as part of this distribution. |
|---|
| 8 | # |
|---|
| 9 | |
|---|
| 10 | try: |
|---|
| 11 | dict.iteritems |
|---|
| 12 | except AttributeError: |
|---|
| 13 | # Python 3 |
|---|
| 14 | def itervalues(d): |
|---|
| 15 | return iter(d.values()) |
|---|
| 16 | def iteritems(d): |
|---|
| 17 | return iter(d.items()) |
|---|
| 18 | is_py3 = True |
|---|
| 19 | else: |
|---|
| 20 | # Python 2 |
|---|
| 21 | is_py3 = False |
|---|
| 22 | def itervalues(d): |
|---|
| 23 | return d.itervalues() |
|---|
| 24 | def iteritems(d): |
|---|
| 25 | return d.iteritems() |
|---|
Note: See
TracBrowser
for help on using the repository browser.