Re: [Tutor] How does this work? Is there anyway to receive live Python help?

2014-05-26 Thread Devin Jeanpierre
FWIW I am an operator on the channel, so, obviously biased. (ssbr)

On Mon, May 26, 2014 at 5:15 PM, Steven D'Aprano  wrote:
> On Mon, May 26, 2014 at 01:04:55PM -0700, Devin Jeanpierre wrote:
>> If you want python help "live", try the #python IRC channel at 
>> irc.freenode.net
>>
>> You'll need to register a nick though, see
>> https://freenode.net/faq.shtml#nicksetup
>
> Ouch!
>
> #python is not very friendly to beginners. (Or anyone else for that
> matter.)

There are many things that are unfriendly about #python, and many
things that are friendly about it. I think it's unfair to casually
dismiss it as a place to learn. If Emma was who I think they were,
their experience seemed fine to me, and their questions seemed
suitable for IRC.

> It's well-suited to questions which can be asked, and
> answered, in one or two sentences, but is completely unsuitable for
> extended discussion.

On the contrary, I prefer #python to the mailing list for smallish but
extended discussion. Because the unit of conversation is very small,
and the turnaround time is so short, small misunderstandings can be
quickly corrected, and the conversation progresses quickly.

It is very often the case that one question leads to another, which
leads to another. In IRC this is one relatively quick (but "extended")
session. This is its core advantage over something like a mailing list
(with its slow round-trip time), and one that I think #python uses
fairly well. On the other hand, mailing lists are amazing for esoteric
questions that need the right pair of eyes or they can't be answered,
or for requests for extended monologues about how something works,
etc. -- IRC can do these, especially the latter, but not as well.

I think the fact that #python is so popular (for extended discussion,
no less) shows that it is not bad, but that it might be a matter of
preference.

> Also they have a bad habit of banning people without warning or
> explanation. And, I have to say, in my opinion often their answers are
> actually *wrong*, but if you try to tell them so they ban you.

You would not be banned for saying an answer is wrong. That happens
all the time, because answers often are wrong. But, for example, you
might be banned if you keep telling everyone "lol wow, you have no
idea what you are talking about", and insulting things like that
(without so much as giving an actual answer yourself). But you would
probably be warned first.

If you have more details, I can offer more help and/or apologies as
warranted. I am only talking in the abstract, and it's possible you
saw somebody be wronged.

-- Devin
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How does this work? Is there anyway to receive live Python help?

2014-05-26 Thread Steven D'Aprano
Hi Emma,


As well as everything else others have said, remember that we're 
scattered all over the world, so you can ask a question at any time of 
the day or night and chances are good that *someone* will read it soon.

When you joined this mailing list, you had a choice of whether to 
receive individual messages, or a daily digest. Make sure you pick 
individual messages, otherwise you will have to wait anything up to 24 
hours before seeing all the replies at once, instead of as them come in. 
You can change your settings here:

https://mail.python.org/mailman/listinfo/tutor


When asking questions, the more detail you can provide, the better our 
answers will be. E.g:

"I need help with my homework!"

(Our answer: Yes, you probably do. Next.)

"I need help with my homework. I have to write a guess-the-number game."

(Our answer: Okay, at least now we know what your homework is. How far 
have you got? What are you having trouble with?)

"I'm writing a guess-the-number game using Python version 3.3. I'm stuck 
at writing this loop, I expect it to ask the user for Yes or No 
repeatedly, but it just loops forever even if the user types No. Here is 
a copy of my code. Oh, and this is homework, so I'm just looking for 
direction and explanation, please don't write my code for me."

(Our answer: Great! That's just about the perfect question, now we can 
answer it.)

If you're unsure about something ("how do I find out what version of 
Python I'm running?") please ask. That includes basic questions like 
"what's a function?". No question about Python is too simple for us to 
answer (although for advanced users, sometimes questions can be too 
specialized for us).

There are no stupid questions although sometimes people ask good 
questions in a stupid manner. Ask questions well and we'll try very hard 
to answer them well.



-- 
Steven
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How does this work? Is there anyway to receive live Python help?

2014-05-26 Thread Steven D'Aprano
On Mon, May 26, 2014 at 01:04:55PM -0700, Devin Jeanpierre wrote:
> If you want python help "live", try the #python IRC channel at 
> irc.freenode.net
> 
> You'll need to register a nick though, see
> https://freenode.net/faq.shtml#nicksetup

Ouch!

#python is not very friendly to beginners. (Or anyone else for that 
matter.) It's well-suited to questions which can be asked, and 
answered, in one or two sentences, but is completely unsuitable for 
extended discussion.

Also they have a bad habit of banning people without warning or 
explanation. And, I have to say, in my opinion often their answers are 
actually *wrong*, but if you try to tell them so they ban you.

[Disclaimer: I haven't bothered with #python for over a year. It's 
possible the culture there has completely changed.]


-- 
Steven
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How does this work? Is there anyway to receive live Python help?

2014-05-26 Thread Devin Jeanpierre
If you want python help "live", try the #python IRC channel at irc.freenode.net

You'll need to register a nick though, see
https://freenode.net/faq.shtml#nicksetup

-- Devin

On Mon, May 26, 2014 at 8:40 AM, Emma Soules  wrote:
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How does this work? Is there anyway to receive live Python help?

2014-05-26 Thread Danny Yoo
Hi Emma,

You can think of the mailing list as a public community forum.  You
may, in fact, see other questions and messages that aren't related to
your particular question.  If you see a question that you think you
can answer, feel free to contribute.

We try to keep the signal-to-noise ratio as high as possible.
Sometimes that effort falters, but we try.  :P


Good luck to you.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How does this work? Is there anyway to receive live Python help?

2014-05-26 Thread Alan Gauld

On 26/05/14 16:40, Emma Soules wrote:


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


This is a mailing list, so you send emails to it with
questions and the people on the list respond with answers
(and probably some questions back).

And yes, we are all alive... But the time to reply to a mail
depends on several factors so you might not get a response
for a few hours (usually within 2 or 3, often less).


The better the question you ask the better the answer you get.
So try to be specific, precise, and include code and error
messages (don't just summarize). Telling us the Python version
and OS often helps too.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] How does this work? Is there anyway to receive live Python help?

2014-05-26 Thread Emma Soules

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Fwd: class to function

2014-05-26 Thread Danny Yoo
On Mon, May 26, 2014 at 12:27 AM, rahmad akbar  wrote:
> thanks guys for the replies,
>
> Danny, your explanation helped alot, i'll have a go on Alan Gaud's
> tutorial. super thanks


You should probably thank Diliup Gabadamudalige instead; I just
forwarded his message.

Best of wishes to you!
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Fwd: class to function

2014-05-26 Thread rahmad akbar
thanks guys for the replies,

Danny, your explanation helped alot, i'll have a go on Alan Gaud's
tutorial. super thanks

On Mon, May 26, 2014 at 9:04 AM, Danny Yoo  wrote:
>
>
> -- Forwarded message --
> From: diliup gabadamudalige 
> Date: Sunday, May 25, 2014
> Subject: [Tutor] class to function
> To: Danny Yoo 
>
>
> Is it wrong to say that  __init__() is to initialize all the conditions you
> setupin the class? That's how i see it.
> I give below the way I see a class and it's workings. Please Correct if any
> mistakes.
>
> Say you have a class for a Spaceship
> Class Spaceship():
>
> under the def __init__():
> you set up all the details you want the spaceship to have. For example,
> self.engine=100
> self. guns=100
> self.shield=250
> self.life=5
>
> self if the Spaceship which will be built using the details given under the
> init in the Class Spaceship. So a class is a blu print to build the space
> ship and the init function contains all the things the space ship will
> contain.
> Now when you want a ne space ship say a RED one
>  you can call the class with
> RedShip=Spaceship()
> and you can now giv e a new character to the space ship. A colour! like this
> RedShip.colour=Red
> Now along with the
> RedShip.enging=100
> RedShip.guns=100
> RedShip.shield=250
> RedShip.life=5
> the RedShip also has a NEW ATTRIBUTE. Colour.
> RedShip.colour=Red
>
> The def__init__() can also be setup so that you can give all the attributes
> its values like this.
> def__init__(power,bullets,energy,life)
>
> RedShip.enging=power
> RedShip.guns=bullets
> RedShip.shield=energy
> RedShip.life=life
>
> this way each ship can have different attributes. But they are all
> Spaceships.
>
>
>
>
> On Mon, May 26, 2014 at 6:38 AM, Danny Yoo  wrote:
>>
>> > i am trying to understand this code:
>> > http://nbviewer.ipython.org/gist/BenLangmead/6665861
>>
>> I'm slightly familiar with the purpose of the code.  It's constructing
>> a Suffix Tree, though not in linear time.
>>
>> Reading the code... ah.  I see.  This is enumerating through all
>> suffixes, and building it by repeated insertion into a trie.
>>
>> http://en.wikipedia.org/wiki/Trie
>>
>> The classes are used here to represent structured data and operations
>> to be performed on that structured data.  The code fundamentally has a
>> structured value called a Node, with two fields to represent the
>> string label and the links to other nodes.
>>
>>
>>
>> Aside: there is a very good book by Dan Gusfield that talks about
>> suffix trees and how to construct them called "Algorithms on Strings,
>> Trees and Sequences: Computer Science and Computational Biology"
>>
>>
>> http://www.amazon.com/Algorithms-Strings-Trees-Sequences-Computational/dp/0521585198
>>
>> which you may want to look at if you're interested in these algorithms.
>>
>>
>> It is probably not a good idea to try to intermix trying to understand
>> an algorithm like this at the same time as you're learning basic
>> features in your programming language.  Consider a slightly simpler
>> example to learn about "classes", apart from the algorithms you are
>> studying.  Most good Python tutorials should cover how to use classes
>> to build structured data and manipulate it.  Alan Gauld's Python
>> tutorial, for example, should have a section on this.
>>
>> http://www.alan-g.me.uk/tutor/tutclass.htm
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> https://mail.python.org/mailman/listinfo/tutor
>
>
>
>
> --
> Diliup Gabadamudalige
>
> http://www.diliupg.com
> http://soft.diliupg.com/
>
> **
> This e-mail is confidential. It may also be legally privileged. If you are
> not the intended recipient or have received it in error, please delete it
> and all copies from your system and notify the sender immediately by return
> e-mail. Any unauthorized reading, reproducing, printing or further
> dissemination of this e-mail or its contents is strictly prohibited and may
> be unlawful. Internet communications cannot be guaranteed to be timely,
> secure, error or virus-free. The sender does not accept liability for any
> errors or omissions.
> **
>
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>



-- 
many thanks
mat
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Fwd: class to function

2014-05-26 Thread Danny Yoo
-- Forwarded message --
From: *diliup gabadamudalige* 
Date: Sunday, May 25, 2014
Subject: [Tutor] class to function
To: Danny Yoo 


Is it wrong to say that  __init__() is to initialize all the conditions you
setupin the class? That's how i see it.
I give below the way I see a class and it's workings. Please Correct if any
mistakes.

Say you have a class for a Spaceship
Class Spaceship():

under the def __init__():
you set up all the details you want the spaceship to have. For example,
self.engine=100
self. guns=100
self.shield=250
self.life=5

self if the Spaceship which will be built using the details given under the
init in the Class Spaceship. So a class is a blu print to build the space
ship and the init function contains all the things the space ship will
contain.
Now when you want a ne space ship say a RED one
 you can call the class with
RedShip=Spaceship()
and you can now giv e a new character to the space ship. A colour! like this
RedShip.colour=Red
Now along with the
RedShip.enging=100
RedShip.guns=100
RedShip.shield=250
RedShip.life=5
the RedShip also has a NEW ATTRIBUTE. Colour.
RedShip.colour=Red

The def__init__() can also be setup so that you can give all the attributes
its values like this.
def__init__(power,bullets,energy,life)

RedShip.enging=power
RedShip.guns=bullets
RedShip.shield=energy
RedShip.life=life

this way each ship can have different attributes. But they are all
Spaceships.




On Mon, May 26, 2014 at 6:38 AM, Danny Yoo

> wrote:

> > i am trying to understand this code:
> > http://nbviewer.ipython.org/gist/BenLangmead/6665861
>
> I'm slightly familiar with the purpose of the code.  It's constructing
> a Suffix Tree, though not in linear time.
>
> Reading the code... ah.  I see.  This is enumerating through all
> suffixes, and building it by repeated insertion into a trie.
>
> http://en.wikipedia.org/wiki/Trie
>
> The classes are used here to represent structured data and operations
> to be performed on that structured data.  The code fundamentally has a
> structured value called a Node, with two fields to represent the
> string label and the links to other nodes.
>
>
>
> Aside: there is a very good book by Dan Gusfield that talks about
> suffix trees and how to construct them called "Algorithms on Strings,
> Trees and Sequences: Computer Science and Computational Biology"
>
>
> http://www.amazon.com/Algorithms-Strings-Trees-Sequences-Computational/dp/0521585198
>
> which you may want to look at if you're interested in these algorithms.
>
>
> It is probably not a good idea to try to intermix trying to understand
> an algorithm like this at the same time as you're learning basic
> features in your programming language.  Consider a slightly simpler
> example to learn about "classes", apart from the algorithms you are
> studying.  Most good Python tutorials should cover how to use classes
> to build structured data and manipulate it.  Alan Gauld's Python
> tutorial, for example, should have a section on this.
>
> http://www.alan-g.me.uk/tutor/tutclass.htm
> ___
> Tutor maillist  -  
> Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>



-- 
Diliup Gabadamudalige

http://www.diliupg.com
http://soft.diliupg.com/

**
This e-mail is confidential. It may also be legally privileged. If you are
not the intended recipient or have received it in error, please delete it
and all copies from your system and notify the sender immediately by return
e-mail. Any unauthorized reading, reproducing, printing or further
dissemination of this e-mail or its contents is strictly prohibited and may
be unlawful. Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. The sender does not accept liability for any
errors or omissions.
**
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor