Python In Entertainment Industry: Coding Style

  • Uploaded by: Shuen-Huei Guan
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Python In Entertainment Industry: Coding Style as PDF for free.

More details

  • Words: 142
  • Pages: 79
Python Programming 101: Coding Style

Shuen-Huei Guan Digimax Inc. 2009/06

Code Like a Pythonista: Idomatic Python

/* -- C -- */

# -- Python --

if (some condition)

def myfunction(foo, bar):

if (some condition) do_something(fancy); else this_sucks(badluck);

foo.boing() for i in bar.fizzle(foo): baz = i**2 foo.wibble(baz) return foo, baz

/* -- another C -- */ if (condition) somethingsExecuted(); alwaysExecuted(shouldNot); alwaysExecuted();

tab size:2

tab size:3

tab size:4

tab size:8

“ general syntax on set modeline set ruler set autoindent “set smartindent “ search set hlsearch set incsearch set showmatch set ignorecase set smartcase “ mouse set mouse=a

autocmd BufRead *.py set sw=4 sts=4 et autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class

# vim: set sw=4 sts=4 et hls is si nu:

autocmd BufRead *.py set list listchars=tab:»_ # ref: http://vim.wikia.com/wiki/Highlight_unwanted_spaces

hello, world by oskay @ flickr.com

Jump to Conclusions mat by Katkreig @ flickr

Related Documents

Entertainment Industry
December 2019 18
C# Coding Style Guide
June 2020 11
Python Style Guide
December 2019 7
Coding Style Guide
November 2019 11
C# Coding Style Paper
December 2019 11

More Documents from ""