Hi everyone
Well, python 3.0 came out just about a week and a bit ago and i though, now people have had a chance to download it and play around with it a bit, what do you think of it? Is it better? What's the best new feature? Stuff like that. Personally i love the new print function, its great to finally see something like that in python.
lllllIllIlllI
178
Veteran Poster
Recommended Answers
Jump to PostI think python 3.0 will clean up the code with a better support for strings (unicode) and the print function. I like the context management protocol (the with statement). I think there is a lot to explore with this. Also class decorators look appealing :)
Jump to PostHere is an example use
import os class Wd(object): def __enter__(self, directory): self.old = os.getcwd() os.chdir(directory) return directory def __exit__(self): os.chdir(self.old) with Wd("/usr/bin") as wd: doSomeFileStuff()
I wouldn't say we need this statement, but it fills a gap: the only tree-like structure at syntax level in python …
Jump to PostI have not used python 3k because I'm still learning under 2.5
Anyway I will be excite for those already are playing with it to tell me what is new and what is better about 3k, which excite them Like what Gribouillis said
Jump to PostHere is link to a good summary with examples, it's Part 1 of ?. http://www.ibm.com/developerworks/linux/library/l-python3-1/index.html?ca=drs- I'm using print() instead of print in 2.5 to re-train, and that simple thing is more difficult than …
Jump to PostI left a few notes on Python30 here:
http://www.daniweb.com/forums/showpost.php?p=761691&postcount=154Python30 will modernize the language. The I/O changes, like print() and input(), will effect us the most. Future posters will have to tell us which version of Python is used.
All 17 Replies
Gribouillis
1,391
Programming Explorer
Team Colleague
lllllIllIlllI
178
Veteran Poster
Gribouillis
1,391
Programming Explorer
Team Colleague
lllllIllIlllI
178
Veteran Poster
Stefano Mtangoo
455
Senior Poster
woooee
814
Nearly a Posting Maven
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
jbennet
1,618
Most Valuable Poster
Team Colleague
Featured Poster
lllllIllIlllI
178
Veteran Poster
sneekula
969
Nearly a Posting Maven
Stefano Mtangoo
455
Senior Poster
lllllIllIlllI
178
Veteran Poster
Stefano Mtangoo
455
Senior Poster
Ene Uran
638
Posting Virtuoso
lllllIllIlllI
178
Veteran Poster
Stefano Mtangoo
455
Senior Poster
Stefano Mtangoo
455
Senior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.