Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Python 3
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2560
Location: Konradsreuth (Germany)

PostPosted: Sat Dec 06, 2008 12:08 pm    Post subject: Python 3 Reply with quote

… ist draußen! Weiß man was, wenn's in Portage aufschlägt? Ich hab keinen Bock, auch nur ein einziges neues Programm in Python < 3 zu schreiben, wenn sich die API geändert hat (zum eindeutig Besseren ;-)
Back to top
View user's profile Send private message
ScytheMan
l33t
l33t


Joined: 30 Nov 2005
Posts: 605

PostPosted: Sat Dec 06, 2008 1:35 pm    Post subject: Reply with quote

nuja der umstieg sollte recht problemlos laufen, gibt ja imho schon tools die v2.6-code in v3.0-code umwandeln können
von daher, solltest du dein coding nicht von der version abhängig machen ;)
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2560
Location: Konradsreuth (Germany)

PostPosted: Sat Dec 06, 2008 1:52 pm    Post subject: Reply with quote

Python-3-haben-will ;-)
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Sat Dec 06, 2008 8:59 pm    Post subject: Reply with quote

ich denke, für python-3 gilt das selbe wie für kde-4 ;). Man sollte warten bis 3.1 da ist *g* - damit das noch mal ordentlich getestet wird, und sich auch die Performance wieder einbekommt

/edit: ach - und wenn man sieht, wie lange das mit python-2.5 gedauert hat, und mit 2.6 sicherlich noch dauern wird ... naja ;) - zieht selber den Schluss

/edit2: Das Hauptproblem wird Portage sein. Wie die Python-Leute selber sagen: Man sollte Software so schreiben, dass sie mit EINEM der beiden funktioniert. Also muss man sich sicherlich eine Lösung ausdenken, so dass Portage Python-2.x benutzt und andere Pakete aber 3.x benutzen können
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2560
Location: Konradsreuth (Germany)

PostPosted: Sun Dec 07, 2008 2:16 am    Post subject: Reply with quote

Wenn, dann wird's ja eh geslottet installiert. Und es kann ja von mir aus auch gern hard masked sein – es geht ja nur drum, daß ich's überhaupt per Portage installieren können will!

Schließlich gibt's ja Symlinks, damit man #!/usr/bin/python2 oder #!/usr/bin/python2.5 oder sonstwas in seine Dateien schreiben kann. Und ich würd dann halt explizit #!/usr/bin/python3 reinschreiben.
Back to top
View user's profile Send private message
Bumbl
n00b
n00b


Joined: 05 Sep 2007
Posts: 50

PostPosted: Mon Dec 08, 2008 4:19 pm    Post subject: Reply with quote

naja
print("Hello World")
statt
print "Hello World"
sehe ich als Nachteil an
die print "x" Lösung sieht besser aus und lässt sich leichter lesen
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2249
Location: My own world! I and Gentoo!

PostPosted: Mon Dec 08, 2008 4:41 pm    Post subject: Reply with quote

Das print "x" könnte (nicht würde) allerdings zu Problemen führen bei folgendem:
print "use "format c:" to delete the Virus M$/Windose"
dagegen
print("use "format c:" to delete the Virus M$/Windose")

(Mal so als Kommentar eines nicht(-python)-Coders
Finde ich nur logisch, da es mit diwersen anderen Skript-Sprachen wie Bash und soweiter zu dieserlei Problemen führt.
Wobei mich dieser Code an C erinnert, könnte mich aber auch irren.)
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)


Last edited by Max Steel on Mon Dec 08, 2008 4:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Mon Dec 08, 2008 4:44 pm    Post subject: Reply with quote

Max Steel wrote:
Das print "x" würde allerdings zu Problemen führen bei folgendem:
print "use "format c:" to delete the Virus M$/Windose"
dagegen
print("use "format c:" to delete the Virus M$/Windose")

wenn dann
Code:
print "use \"format c:\" to delete the Virus M$/Windose"

und
Code:
print("use \"format c:\" to delete the Virus M$/Windose")

Richtig escapen muss schon sein ;)

Aber: Niemand kann wirklich begründen, warum "print" ein Keyword ist und keine Funktion. Vor allem weil durch das Keyword Sachen wie
Code:
print "Ohne newline",
möglich sind (sein müssen), die nicht wirklich intuitiv sind.
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
Vortex375
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1739
Location: Deutschland

PostPosted: Mon Dec 08, 2008 5:47 pm    Post subject: Reply with quote

Also ich finde die Neuerungen und Änderungen eigentlich allesamt ganz cool. Allerdings kann, obwohl man bei der Funktionsdeklaration nun Parameter- und Rückgabe-Typen angeben kann, doch immer noch keine Funktionen überladen, oder?

Und wo ist eigentlich genau erklärt, was man mit diesen "decorators" anfängt und welche Vorteile die "new style classes" bieten?


Übrigens: Gehört der Thread hier nicht eigentlich ins Diskussionsforum? :P
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Mon Dec 08, 2008 5:58 pm    Post subject: Reply with quote

Also decorators und new-style classes gibt es schon seit ungefähr ewigkeiten (min seit Python-2.4)

Docs findet man u.a. hier: Decorators, new style classes

/edit: Zu den Typen: Wichtig: Du gibst nur beliebige Infos an. Dass diese Infos Typ-Informationen sind, ist nur für die auswertende Software wichtig. Und eben diese soll sich denn auch um Sachen wie überladen kümmern ;)
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Mon Dec 08, 2008 9:31 pm    Post subject: Reply with quote

Wie Vortex375 richtig bemerkte:
Moved from Deutsches Forum (German) to Diskussionsforum.
_________________
Bitte auf Rechtschreibung, korrekte Formatierung und Höflichkeit achten!
Danke
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2560
Location: Konradsreuth (Germany)

PostPosted: Wed Dec 17, 2008 5:28 pm    Post subject: Reply with quote

Python 3 ist immer noch nicht in Portage *quengel*
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2560
Location: Konradsreuth (Germany)

PostPosted: Thu Jan 08, 2009 11:24 am    Post subject: Reply with quote

Na zumindest gibt's Python 3 in nem Overlay: http://overlays.gentoo.org/proj/python/wiki :-)
Back to top
View user's profile Send private message
Polynomial-C
Retired Dev
Retired Dev


Joined: 01 Jun 2003
Posts: 1432
Location: Germany

PostPosted: Thu Jan 08, 2009 12:31 pm    Post subject: Reply with quote

Das ist das gleiche wie mit perl-5.10
Es wird ewig dauern, bis sich in Der Richtung bei Gentoo mal was bewegt (*seufz*)
_________________
The manual said "Requires Windows10 or better" so I installed GNU/Linux...

my portage overlay

Need a stage1 tarball? (Unofficial builds)
Back to top
View user's profile Send private message
doedel
Guru
Guru


Joined: 05 Feb 2006
Posts: 579
Location: Denmark

PostPosted: Thu Jan 08, 2009 3:05 pm    Post subject: Reply with quote

Naja, klar dass das ein Weilchen dauern wird, wie schon angesprochen, erstmal abwarten bis die schlimmsten Bugs gefunden und beseitigt wurden.

Stellt euch mal vor, Portage funzt nicht mehr wie es soll *waaaarghs* :D
_________________
1 ha == 1 Hekto-Ar == 1 Hektar
Back to top
View user's profile Send private message
Polynomial-C
Retired Dev
Retired Dev


Joined: 01 Jun 2003
Posts: 1432
Location: Germany

PostPosted: Thu Jan 08, 2009 3:12 pm    Post subject: Reply with quote

Wobei ich mir ziemlich sicher bin, daß die portage-bugs die ersten sein werden, die man findet und hoffentlich behebt.
_________________
The manual said "Requires Windows10 or better" so I installed GNU/Linux...

my portage overlay

Need a stage1 tarball? (Unofficial builds)
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2560
Location: Konradsreuth (Germany)

PostPosted: Fri Jan 09, 2009 10:02 am    Post subject: Reply with quote

doedel wrote:
Stellt euch mal vor, Portage funzt nicht mehr wie es soll *waaaarghs* :D

Ja schon klar, daß Python 3 nicht morgen oder übermorgen das default-Python wird. Aber es geht ja drum, daß Python 3 _überhaupt mal_ in Portage ist (gern hard masked), weil geslottet wird's doch eh! Und jemand (wie ich), der Python 3 haben will, muß dann eben statt #!/usr/bin/python #!/usr/bin/python3.0 schreiben.

Vom bloßen Vorhandensein von Python 3 in Portage geht gar nix kaputt.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum