Weil ich grad im Planet darueber gestolpert bin: You know you're a python programmer, when ..
Lasst uns mal Python-Humor sammeln!
Abseits der offiziellen Seite natuerlich.
Und gleich noch import antigravity dazu.
Python-Humor
- cofi
- Python-Forum Veteran
- Beiträge: 4432
- Registriert: Sonntag 30. März 2008, 04:16
- Wohnort: RGFybXN0YWR0
Michael Markert ❖ PEP 8 Übersetzung ❖ Tutorial Übersetzung (3.x) ⇒ Online-Version (Python 3.3) ❖ Deutscher Python-Insider ❖ Projekte
-
- User
- Beiträge: 996
- Registriert: Mittwoch 9. Januar 2008, 13:48
Will mir das mal einer erklaeren?cofi hat geschrieben:Und gleich noch import antigravity dazu.
@Dauerbaustelle: Was gibt's da zu erklären? Der Autor von xkcd mag Python. Weil man mit kurzen, einfachen Programmen soviel erreichen kann. Er fühlt sich von Perl befreit. Siehe auch den 'alt'-Text vom Comic-Bild. (Die meisten Browser zeigen den als Tooltip wenn man mit der Maus über dem Bild verharrt.)
Oh, und bei Python 3.x gibt's ein `antigravity`-Modul in der Standardbibliothek. Einfach mal den ``import`` eingeben.
Oh, und bei Python 3.x gibt's ein `antigravity`-Modul in der Standardbibliothek. Einfach mal den ``import`` eingeben.
Nicht zu vergessen, die geohash-Funktion: http://xkcd.com/426/
[url=http://wiki.python-forum.de/PEP%208%20%28%C3%9Cbersetzung%29]PEP 8[/url] - Quak!
[url=http://tutorial.pocoo.org/index.html]Tutorial in Deutsch[/url]
[url=http://tutorial.pocoo.org/index.html]Tutorial in Deutsch[/url]
BlackJack: Du meinst wohl das title-Attribute des img-Tags. Alt hat eine andere Funktion (Text, der angezeigt wird, wenn das Bild nicht angezeigt werden kann, weil das Bild nicht gefunden werden kann (404) oder weil ein Browser benutzt wird, der keine Bilder darstellen kann). XKCD löst das Problem mit der Barrierefreiheit bei Bildern auf eine andere Art als das alt-Attribut zu nutzen. Ein Auszug aus dem Quelltext des Browsers:
Code: Alles auswählen
<img src="http://imgs.xkcd.com/comics/python.png" title="I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I'm leaving you." alt="Python" /><br/>
<br/>
<div class="menuCont">
<ul>
<li><a href="/1/">|<</a></li>
<li><a href="/352/" accesskey="p">< Prev</a></li>
<li><a href="http://dynamic.xkcd.com/random/comic/" id="rnd_btn_b">Random</a></li>
<li><a href="/354/" accesskey="n">Next ></a></li>
<li><a href="/">>|</a></li>
</ul>
</div>
<h3>Permanent link to this comic: http://xkcd.com/353/</h3>
<h3>Image URL (for hotlinking/embedding): http://imgs.xkcd.com/comics/python.png</h3>
<div id="transcript" style="display: none">[[ Guy 1 is talking to Guy 2, who is floating in the sky ]]
Guy 1: You're flying! How?
Guy 2: Python!
Guy 2: I learned it last night! Everything is so simple!
Guy 2: Hello world is just 'print "Hello, World!" '
Guy 1: I dunno... Dynamic typing? Whitespace?
Guy 2: Come join us! Programming is fun again! It's a whole new world up here!
Guy 1: But how are you flying?
Guy 2: I just typed 'import antigravity'
Guy 1: That's it?
Guy 2: ...I also sampled everything in the medicine cabinet for comparison.
Guy 2: But i think this is the python.
{{ I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I'm leaving you. }}</div>
-
- User
- Beiträge: 424
- Registriert: Montag 28. Juli 2003, 16:19
- Wohnort: /dev/reality
Dieser Beitrag von CM muss hier einfach hin.
CM hat geschrieben:Code: Alles auswählen
import glob from magic import Carpet, Broom teppich = Carpet() besen = Broom(shaft='long', bar='40cm', bristles='horsehair') if __name__=='__main__': files = glob.glob(Dein_Pattern) teppich.elevate() besen.sweep(files, dest=teppich) teppich.drop()
I'm not getting paid for being Mr. Nice Guy!
Würde mich auch interessieren. Der Code erscheint so sinnlos - heute würde ich anders schreiben. (Wozu gibt es schließlich multiprocessing? )
Es scheint als könne man Code im Forum nicht per Suchmaschine suchen.
Gruß,
Christian
Es scheint als könne man Code im Forum nicht per Suchmaschine suchen.
Gruß,
Christian