File: x.py.styled

package info (click to toggle)
codequery 1.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,860 kB
  • sloc: cpp: 151,420; xml: 16,576; python: 5,602; ansic: 5,487; makefile: 559; perl: 496; ruby: 209; sql: 194; sh: 106; php: 53; vhdl: 51; erlang: 47; objc: 22; lisp: 18; cobol: 18; modula3: 17; asm: 14; fortran: 12; ml: 11; tcl: 6
file content (19 lines) | stat: -rw-r--r-- 636 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
{1}# Convert all punctuation characters except '_', '*', and '.' into spaces.{0}
{5}def{0} {9}depunctuate{10}({11}s{10}):{0}
	{6}'''A docstring'''{0}
	{7}"""Docstring 2"""{0}
	{11}d{0} {10}={0} {3}""{0}
	{5}for{0} {11}ch{0} {5}in{0} {11}s{10}:{0}
		{5}if{0} {11}ch{0} {5}in{0} {4}'abcde'{10}:{0}
			{11}d{0} {10}={0} {11}d{0} {10}+{0} {11}ch{0}
		{5}else{10}:{0}
			{11}d{0} {10}={0} {11}d{0} {10}+{0} {3}" "{0}
	{5}return{0} {11}d{0}

{5}import{0} {11}contextlib{0}

{15}@contextlib{10}.{11}contextmanager{0}
{5}def{0} {9}singleuse{10}():{0}
	{5}print{10}({3}"Before"{10}){0}
	{5}yield{0}
{5}with{0} {11}singleuse{10}():{0} {5}pass{0}