File: future_builtins.py

package info (click to toggle)
kdevelop-python 24.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 12,640 kB
  • sloc: python: 183,048; cpp: 18,798; xml: 140; sh: 14; makefile: 9
file content (46 lines) | stat: -rw-r--r-- 1,014 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
""""""
def ascii(object):
	"""
	Returns the same as :func:`repr`.  In Python 3, :func:`repr` will return
	printable Unicode characters unescaped, while :func:`ascii` will always
	backslash-escape them.  Using :func:`future_builtins.ascii` instead of
	:func:`repr` in 2.6 code makes it clear that you need a pure ASCII return
	value.
	
	"""
	pass
	
def filter(function,iterable):
	"""
	Works like :func:`itertools.ifilter`.
	
	"""
	pass
	
def hex(object):
	"""
	Works like the built-in :func:`hex`, but instead of :meth:`__hex__` it will
	use the :meth:`__index__` method on its argument to get an integer that is
	then converted to hexadecimal.
	
	"""
	pass
	
def map(function,iterable,more):
	"""
	Works like :func:`itertools.imap`.
	
	"""
	pass
	
def oct(object):
	"""
	Works like the built-in :func:`oct`, but instead of :meth:`__oct__` it will
	use the :meth:`__index__` method on its argument to get an integer that is
	then converted to octal.
	
	"""
	pass