Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Python users, why?

Name: Anonymous 2011-12-05 10:39

Seriously asking, for the people that like python, why do you like it, and what do you normally use it for?

Name: Anonymous 2011-12-05 10:40

I can easily do big numbers.

Name: PYTHONNER 2011-12-05 10:47

I don't know any other language.

Name: Anonymous 2011-12-05 11:13

Python isn't the worst language, and since your employer isn't likely to let you program in Scheme/Haskell/Smalltalk/J/whatever it's often better than the alternative i.e. Java.

Name: Anonymous 2011-12-05 11:24

Market demand: when a jewish employer wants you to use Python or Java, a goy, like you, is not supposed to ask "why". You'll eat shit, when ordered, goy.

Name: Anonymous 2011-12-05 11:26

>>2

I can easily do big numbers in Ruby, and then I don't have forced indentation of code.

Name: Anonymous 2011-12-05 11:29

SUCK MY DIG

Name: OP 2011-12-05 11:37

Oh my. So what you guys are saying is that, other than >>3, you guys don't actually use python in your personal programs?

Name: >>3 2011-12-05 11:41

>>8
I was just kidding. I don't use Python because it's plain and simple a terrible language.

Name: Anonymous 2011-12-05 11:55

For a while ruby and python were the only two practical choices for web development that weren't completely dreadful.

I chose python as:

It has a single callable type and not a clusterfuck of procs, lambdas, sprogs and dongles.

No-one is going to write incompatible versions of String.toLookAtMeImARockStarBlogPost

It is slow but not stupid slow.

Name: Anonymous 2011-12-05 12:08

>>10
It has a single callable type and not a clusterfuck of procs, lambdas, sprogs and dongles.
Yet it's terrible for functional style.

It is slow but not stupid slow.
Actually, CPython (the only usable implementation thanks to the lack of a stable API) is ridiculously slow for what it does, mainly due to its very badly designed GC and threading model.

Name: Anonymous 2011-12-05 12:20

mainly due to its very badly designed GC and threading model.
Stopped reading right there. Complaining about Python's GC is a very useful symptom of mental retardation.

Name: Anonymous 2011-12-05 12:26

>>12
IHBT.

Name: Anonymous 2011-12-05 12:57

small scripts look decent in python, imo.

it can be very quick at getting something hacked together.

most things have python libs.

Name: Anonymous 2011-12-05 12:59

>>1
Fast prototyping at expense of code quality and performance.

Name: Anonymous 2011-12-05 13:13

It's a better perl.

Name: Anonymous 2011-12-05 13:39

>>16

ruby is more of a perl than python.

visually, perl and ruby code is stuffed with symbols, python code is more plainly textual.

ruby and perl users both delight in horrific black magic hackery, whereas python users like to be "explicit" and make you pay a __tax__ for __hacking__ that makes your code __ugly__

python is "there is one retarded way to do it"
perl and ruby are "there are many retarded ways to do it"

Name: Anonymous 2011-12-05 13:54

>>17
I was actually trolling. I don't use python or perl.

Name: Anonymous 2011-12-05 14:30

The code is clean, human readable, and fast to put together.

I run quite a few scripts on my Linux box, they really help customize the experience for me.

Name: Anonymous 2011-12-05 15:28

Why do you morons keep arguing which language is better than the other when you clearly don't program anything at all. And no language can be the 66best99 at every task.

Clearly there are some tasks which python is better suited than C or sepples or CL usw.

Name: Anonymous 2011-12-05 17:54

>>20
Clearly there are some people which python is better suited than C or sepples or CL usw.

Name: Anonymous 2011-12-05 20:12

Lua FTW!!!

Name: Anonymous 2011-12-05 22:28

I like all the libraries.

>>22
~= is annoying as fuck though

Name: Anonymous 2011-12-06 9:51

>>17
Decent explanation. I only speak a few dialects of retard, and can thankfully still figure out the full-retard Python code that appears here. Couldn't be bothered doing the same for perl/ruby. Also, I'll take __writing__ over .getting() and .setting() any day, but even the trolls aren't brazen enough to suggest otherwise.

>>23
Nearly everything ...but the HTTP libraries. WTF guys.

>>19
Can you customize MY ANUS?

Name: Anonymous 2011-12-06 10:23

why do you like it
It's good for everything.
what do you normally use it for?
Everything.

Name: Anonymous 2011-12-06 15:05

>>20
>no language can be the 66best99 at every task.
What about Lisp? It can be adapted for any task.

Name: Anonymous 2011-12-06 15:42

>>26
That means that it's shit at any task.

Name: Anonymous 2011-12-06 16:15

Name: Anonymous 2011-12-06 16:16

>>26
Could you do any task easily?

>>27
I'll read this as "That means that with it I do shit at any task.".

Name: Anonymous 2011-12-06 16:20

>>29
define "easily"

Name: Anonymous 2011-12-06 16:52

Lisp is shit.

Name: Anonymous 2011-12-07 2:55

>>12

The last sentence is always the best place to stop reading.

>>10

I really don't understand why python is so slow. I get that it could be complex to parse and all, but once that phase is over, it should run fast right? Is there anything special about python that forces it to be slower than any other dynamic language?

>>23

Lua isn't the only language to use ~= for not equals. Some other ones use <> for not equals (like it is greater than or less than, but not equal to).

>>24

getting and setting is a very powerful abstraction technique, that allows data types to change while having their data accessed through a consistent interface. When other part os the program have direct access to member variables of other objects, they lock those objects by creating work that you would need to do if you were to ever change the layout of the exposed objects.

Name: Anonymous 2011-12-07 6:23

>>32
In Python, you have property, which makes accessing a member call a method. No need for explicit getter/setter calls.

Name: Anonymous 2011-12-07 6:58

If it ain't multimethods, it's shit.

Name: Anonymous 2011-12-07 8:30

>>32
If you're changing the layout, you're expecting changes, yes?


### Start with... ###
class Anus:
    def __init__(self):
        self.haxxed = True

myAnus = Anus()
if myAnus.haxxed is True:
    print 'NO EXCEPTIONS'


(Ignoring that we could've just used the Pythonic if myAnus.haxxed: and it would work in both cases above/below.)


### Changes to... ###
class Anus:
    def __init__(self):
        self.haxxed = "thoroughly"

myAnus = Anus()
if myAnus.haxxed == "thoroughly":
    print 'NO EXCEPTIONS'


Using get/set (in any language) wouldn't save you from needing to mirror the change in class with the if statement. If you wanted that kind of resilience sprinkled about your code, you'd use a method in the first place.


### Should've been doing this all along... ###
class Anus:
    def __init__(self):
        self.haxxed = "thoroughly"
   
    def isHaxxed(self):
        return self.haxxed == "thoroughly"

myAnus = Anus()
if myAnus.isHaxxed:
    print 'NO EXCEPTIONS'


Maybe I'm misunderstanding your comment, but that was my first reason for railing against set/get.

What is Java? A miserable little pile of boilerplate.

Name: Anonymous 2011-12-07 8:33

Also, fuck my parens.

Spot the bug and win a free* XBAWKS!

Name: Anonymous 2011-12-07 8:39

>>36

if myAnus.isHaxxed:
    print 'NO EXCEPTIONS'

Should be:

if myAnus.isHaxxed():
    print 'NO EXCEPTIONS'


I would like my xbawks delivered anally via a cunning RED RING OF DEATH!! pun.

Name: Anonymous 2011-12-07 9:04

(when (haxxedp anus)
  (write-string "NO EXCEPTIONS"))

Name: Anonymous 2011-12-07 14:30

>>35
class Anus (object):
    def __init__ (self):
        self.__haxxed = True

    @property
    def haxxed (self):
        return self.__haxxed

Name: Anonymous 2011-12-07 15:24

>>39
u mena
class Anus (object):
    def __init__(self):
        self.haxxed = True

?

Name: Anonymous 2011-12-07 15:33

>>40
u meana
class Anus(object): haxxed = True
?

Name: Anonymous 2011-12-07 15:40

>>41
u mena
{'haxxed':True}
?!

Name: Anonymous 2011-12-07 15:40


class Redundancy (object):
    def __init__ (self):
        self.______haxxed_____ = True

    def getHaxxed (self):
        return self.______haxxed_____


what it could be:


class Beauty
    attr_accessor :sex

    def initialize
        @sex = true
    end
end

Name: Anonymous 2011-12-07 15:41

>>42
That's not a class anymore, so it can't be used the same way.
If you want to do it in a different way, just do haxxed=True.

Name: Anonymous 2011-12-07 15:42

>>43                                              `
>no FIOC

Shit.

Name: Anonymous 2011-12-07 23:19

>>33

Well that is nifty.

>>35

But what if the state that determined whether or not the anus was haxed was moved into another class. Like if the anus had a key that was used to index into another data structure, or database, or do a query to another machine over the internet, and then the haxed state would be retrieved. You could modify the getHaxed and setHaxed methods to implement this, and the calling code would not need to be changed. If the calling code happens to be 50,000 lines of code, separated among 100 different files, in 26 different directories, then that could save a lot of time.

Name: Anonymous 2011-12-08 2:47

>>43
That is certainly why I laugh out loud when Python users say it's superior for they have their OOP, e.g. compared to Perl

package Classy {
    use Moose;
    has 'style', is => 'ro', default => sub { 1 };
}

my $foo = Classy->new();
say $foo->style; # 1

Name: Anonymous 2011-12-08 7:34

>>43
what it could be:

public class Enterprise {

    private boolean haxxed;

    public Enterprise() {
        setHaxxed(true);
    }

    public boolean isHaxxed() {
        return this.haxxed;
    }

    public void setHaxxed(boolean haxxed) {
        this.haxxed = haxxed;
    }

}

Don't change these.
Name: Email:
Entire Thread Thread List