You are not logged in.

#1 2007-11-02 12:32:13

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Python: Code like a pythonista

http://python.net/~goodger/projects/pyc … ndout.html

Stumbled across that in a google search... some really useful things in there that I never knew. Hopefully it's useful to someone else.

James

Offline

#2 2007-11-02 13:25:56

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: Python: Code like a pythonista

/me bookmarks

Looks interesting (haven't read it all yet), thanks for sharing.


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#3 2007-11-02 16:00:23

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: Python: Code like a pythonista

awesome.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#4 2007-11-02 18:01:15

Husio
Member
From: Europe
Registered: 2005-12-04
Posts: 359
Website

Re: Python: Code like a pythonista

It's quite old...
here's polish translation: http://www.rwdev.eu/articles/objectthinking

Offline

#5 2007-11-02 19:02:11

voonte
Member
Registered: 2007-08-02
Posts: 15

Re: Python: Code like a pythonista

Quite interesting read, indeed.

But, I have never understood the

- 4 spaces per indentation level.
- No hard tabs.

argument.

Offline

#6 2007-11-02 21:55:40

Husio
Member
From: Europe
Registered: 2005-12-04
Posts: 359
Website

Re: Python: Code like a pythonista

First it was 8 spaces per level, but that was too much. Maybe becouse line shouldn't been longer than 78 chars. And why no hard tabs? Becouse.

Last edited by Husio (2007-11-02 21:56:21)

Offline

#7 2007-11-02 22:15:05

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Python: Code like a pythonista

voonte wrote:

Quite interesting read, indeed.

But, I have never understood the

- 4 spaces per indentation level.
- No hard tabs.

argument.

It's a bikeshed. There are arguments for and against both sides - a coder's holy war. The only way to solve it is to say "screw you all, do it this way". Guido did just that.

Offline

#8 2007-11-02 23:40:01

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 618

Re: Python: Code like a pythonista

Well, they couldn't very well argue about bracing styles.


Cthulhu For President!

Offline

#9 2007-11-03 11:48:36

voonte
Member
Registered: 2007-08-02
Posts: 15

Re: Python: Code like a pythonista

phrakture wrote:

It's a bikeshed. There are arguments for and against both sides - a coder's holy war. The only way to solve it is to say "screw you all, do it this way". Guido did just that.

Right. Clear directives are better than loose. Although, I guess I'll have to deviate from this particular suggestion, for the same reason I won't use 2 space indentations in Ruby.

Offline

#10 2007-11-04 11:20:12

bboozzoo
Member
From: Poland
Registered: 2006-08-01
Posts: 120

Re: Python: Code like a pythonista

phrakture wrote:
voonte wrote:

Quite interesting read, indeed.

But, I have never understood the

- 4 spaces per indentation level.
- No hard tabs.

argument.

It's a bikeshed. There are arguments for and against both sides - a coder's holy war. The only way to solve it is to say "screw you all, do it this way". Guido did just that.

Consistency is what really matters. I can show you a bunch of code, written in number of editors by a group of people who did not really care about consistency. Hopefully this is only C code, easy to fix with indent.

Offline

#11 2007-11-04 14:36:11

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: Python: Code like a pythonista

This is interresting.
Thanks iphitus smile

Offline

Board footer

Powered by FluxBB