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

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-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;
    }

}

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