473,842 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Love :)

mwt
I've only been goofing around with Python for about a month now, but
already I am in love.
I never get that feeling -- so common with Java -- that I'm swimming
upstream, struggling to force the language to do what I want.
Python makes it feel effortless and easy.

Mar 11 '06 #1
13 1304
Spread the love - tell your Java freinds :-)

Mar 12 '06 #2

Paddy wrote:
Spread the love - tell your Java freinds :-)


well said paddy ! :-))

Mar 12 '06 #3
al pacino wrote:
Paddy wrote:
Spread the love - tell your Java freinds :-)


well said paddy ! :-))


and ixnay on the ubyray or else I'll tell you where to stick your
endblock delimiter :P
Mar 13 '06 #4
BWill wrote:
and ixnay on the ubyray or else I'll tell you where to stick your
endblock delimiter :P


OK, I can't help it... which is more readable:

a_string.revers e (ruby)
a_string[::-1] (python)

Mar 13 '06 #5
rtilley <rt*****@vt.edu > writes:
a_string.revers e (ruby)
a_string[::-1] (python)


reversed(a_stri ng) (python)
Mar 13 '06 #6
Paul Rubin wrote:
reversed(a_stri ng) (python)


Which version of Python offers this function? It doesn't seem to be
available in the 2.3 version I have installed...

Mar 13 '06 #7
"gregarican " <gr*********@gm ail.com> writes:
reversed(a_stri ng) (python)


Which version of Python offers this function? It doesn't seem to be
available in the 2.3 version I have installed...


I think it's new in 2.4.
Mar 13 '06 #8
Paul Rubin wrote:
"gregarican " <gr*********@gm ail.com> writes:
> reversed(a_stri ng) (python)


Which version of Python offers this function? It doesn't seem to be
available in the 2.3 version I have installed...


I think it's new in 2.4.


Needs a little help, though:
print reversed("abba" ) <reversed object at 0x4029454c>
class Str(str): .... def __reversed__(se lf):
.... return self[::-1]
.... reversed(Str("a bba"))

'abba'

Now if only I had picked a better example :-)

Peter
Mar 13 '06 #9
Peter Otten <__*******@web. de> writes:
print reversed("abba" )

<reversed object at 0x4029454c>


Darn, yes, that's the second time in the past couple weeks I've made
that exact same error in a clpy post. So what's the most concise way
of turning it back into a string? ''.join(list(re versed(a_string ))) ?
Bleccch.
Mar 13 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
19242
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have any preconceived ideas about it. I have noticed, however, that every programmer I talk to who's aware of Python is also talking about Ruby. So it seems that Ruby has the potential to compete with and displace Python. I'm curious on what basis it...
9
3054
by: kbass | last post by:
I am starting to learn Python but I want to know how the job market looks for programming using Python. I really don't see many jobs (probably one or two) that require Python experience at all. Most DBA and SA positions that I have seen require Perl and most development position require Java or C++ so how can learning Python benefit my career if there are little to no chance that an employer will require the use of Python or consider using...
47
3686
by: Michael Scarlett | last post by:
There is an amazing article by paul graham about python, and an even better discussion about it on slashdot. The reason I point this out, is the more I read both articles, the more I realised how we would be mutilating the language with that god forsaken @ decorator. I don't know about the rest of you, but I learned python and fell in love with its syntax and simplicity. Python - just works. So please GVR. Don't complicate it. Leave it as...
52
3878
by: Neuruss | last post by:
It seems there are quite a few projects aimed to improve Python's speed and, therefore, eliminate its main limitation for mainstream acceptance. I just wonder what do you all think? Will Python (and dynamic languages in general) be someday close to compiled languages speed? What will be the future of Psyco, Pypy, Starkiller, Ironpython and all the other projects currently on development?
63
5204
by: Davor | last post by:
Is it possible to write purely procedural code in Python, or the OO constructs in both language and supporting libraries have got so embedded that it's impossible to avoid them? Also, is anyone aware of any scripting language that could be considered as "Python minus OO stuff"? (As you can see I'm completely new to Python and initially believed it's a nice&simple scripting language before seeing all this OO stuff that was added in over...
68
5909
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
18
1281
by: Kamilche | last post by:
I have been programming in Python for years, and I'm STILL learning new features about the language. I'm looking for the best way to handle events with my own UI developed in PyGame, and I've programmed up 4 ways to do it so far, and have a couple more waiting to be done! Python is so amazingly flexible, it will happily accommodate whatever I manage to spew forth as my event handling system. It really fires the imagination. In other...
10
2286
by: A.M | last post by:
Hi, I am having difficulty with shell scripting in Python. I use the following command to run a DOS command and put the return value in a Python variable:
9
2662
by: warpcat | last post by:
I've been scripting in Maya, via mel for years now. Recently learning to Python, love it. Thing that's driving me nuts it the IDE. I'm using PythonWin right now and trying to find something better, mainly with this functionality: In Maya's mel script editor window, it's split into two sections. Bottom window you can enter commands (where your script lives), top window gives results. The thing I'm really used to is highlighting X# of...
0
9875
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9715
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10945
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9454
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5697
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5886
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4500
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4090
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3146
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.