Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #26547 > unrolled thread

Intermediate Python user needed help

Started byJohn Mordecai Dildy <jdildy85@gmail.com>
First post2012-08-05 12:29 -0700
Last post2012-08-07 07:09 -0700
Articles 20 on this page of 49 — 21 participants

Back to article view | Back to comp.lang.python


Contents

  Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 12:29 -0700
    Re: Intermediate Python user needed help John Ladasky <john_ladasky@sbcglobal.net> - 2012-08-05 12:34 -0700
    Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 12:44 -0700
    Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 12:51 -0700
      Re: Intermediate Python user needed help Andrew Berg <bahamutzero8825@gmail.com> - 2012-08-05 15:09 -0500
      Re: Intermediate Python user needed help xDog Walker <thudfoo@gmail.com> - 2012-08-05 13:15 -0700
      Re: Intermediate Python user needed help Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-05 20:24 +0000
        Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 13:31 -0700
    Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 13:16 -0700
      Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 13:17 -0700
    Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 13:19 -0700
    Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 13:52 -0700
      Re: Intermediate Python user needed help Roy Smith <roy@panix.com> - 2012-08-05 17:01 -0400
      Re: Intermediate Python user needed help Tim Chase <python.list@tim.thechases.com> - 2012-08-05 16:03 -0500
        Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 14:09 -0700
        Re: Intermediate Python user needed help Roy Smith <roy@panix.com> - 2012-08-05 17:32 -0400
          Re: Intermediate Python user needed help Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-05 23:15 +0100
          Re: Intermediate Python user needed help Tim Chase <python.list@tim.thechases.com> - 2012-08-05 18:27 -0500
      Re: Intermediate Python user needed help Vlastimil Brom <vlastimil.brom@gmail.com> - 2012-08-05 23:06 +0200
      Re: Intermediate Python user needed help Zero Piraeus <schesis@gmail.com> - 2012-08-05 17:07 -0400
      Re: Intermediate Python user needed help MRAB <python@mrabarnett.plus.com> - 2012-08-05 22:08 +0100
      Re: Intermediate Python user needed help MRAB <python@mrabarnett.plus.com> - 2012-08-05 22:12 +0100
        Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 14:14 -0700
          Re: Intermediate Python user needed help alex23 <wuwei23@gmail.com> - 2012-08-05 19:49 -0700
        Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 14:14 -0700
          Re: Intermediate Python user needed help "William R. Wing" <wrw@mac.com> (Bill Wing) - 2012-08-05 19:38 -0400
      Re: Intermediate Python user needed help Andre Ramaciotti <andre@ramaciotti.com> - 2012-08-05 18:22 -0300
        Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 15:00 -0700
        Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 15:00 -0700
          Re: Intermediate Python user needed help Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-05 23:17 +0100
          Re: Intermediate Python user needed help Tim Chase <python.list@tim.thechases.com> - 2012-08-05 18:19 -0500
            Re: Intermediate Python user needed help Roy Smith <roy@panix.com> - 2012-08-05 19:32 -0400
              Re: Intermediate Python user needed help Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-05 21:15 -0400
              Re: Intermediate Python user needed help Tim Chase <python.list@tim.thechases.com> - 2012-08-05 20:27 -0500
            Re: Intermediate Python user needed help Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-06 00:42 +0000
      Re: Intermediate Python user needed help Jugurtha Hadjar <jugurtha.hadjar@gmail.com> - 2012-08-07 04:06 +0100
        Re: Intermediate Python user needed help rusi <rustompmody@gmail.com> - 2012-08-06 20:52 -0700
          Re: Intermediate Python user needed help Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-07 12:27 -0400
    Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-05 15:39 -0700
    Re: Intermediate Python user needed help Ethan Furman <ethan@stoneleaf.us> - 2012-08-06 09:05 -0700
      Re: Intermediate Python user needed help Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-07 01:16 +0000
        Re: Intermediate Python user needed help rusi <rustompmody@gmail.com> - 2012-08-06 20:55 -0700
    Re: Intermediate Python user needed help Alec Taylor <alec.taylor6@gmail.com> - 2012-08-07 02:13 +1000
    Re: Intermediate Python user needed help Jean-Michel Pichavant <jeanmichel@sequans.com> - 2012-08-06 19:05 +0200
    Re: Intermediate Python user needed help Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-06 15:22 -0400
    Re: Intermediate Python user needed help Chris Angelico <rosuav@gmail.com> - 2012-08-07 07:59 +1000
    Re: Intermediate Python user needed help Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-06 23:39 -0400
      Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-07 07:09 -0700
      Re: Intermediate Python user needed help John Mordecai Dildy <jdildy85@gmail.com> - 2012-08-07 07:09 -0700

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#26564

FromMRAB <python@mrabarnett.plus.com>
Date2012-08-05 22:08 +0100
Message-ID<mailman.2975.1344200924.4697.python-list@python.org>
In reply to#26559
On 05/08/2012 21:52, John Mordecai Dildy wrote:
> Current Problem at the moment
>
> Traceback (most recent call last):
>    File "ex26.py", line 66, in <module>
>      beans, jars, crates = secret_formula(start-point)
> NameError: name 'start' is not defined
>
> anyone know how to make start defined
>
You have "start-point", but I think that should be "start_point",
judging by the previous line.

[toc] | [prev] | [next] | [standalone]


#26566

FromMRAB <python@mrabarnett.plus.com>
Date2012-08-05 22:12 +0100
Message-ID<mailman.2976.1344201172.4697.python-list@python.org>
In reply to#26559
On 05/08/2012 22:03, Tim Chase wrote:
> On 08/05/12 15:52, John Mordecai Dildy wrote:
>> Current Problem at the moment
>>
>> Traceback (most recent call last):
>>   File "ex26.py", line 66, in <module>
>>     beans, jars, crates = secret_formula(start-point)
>> NameError: name 'start' is not defined
>>
>> anyone know how to make start defined
>
> "start-point" is not a valid identifier as the "-" isn't permitted
> in a variable name.  This is the case for just about every language
> out there.  HTML/XML & CSS are the only languages that come to my
> mind in which the dash is considered a valid part of an identifier.
>
I believe that Cobol allows "-"  in names.

[toc] | [prev] | [next] | [standalone]


#26567

FromJohn Mordecai Dildy <jdildy85@gmail.com>
Date2012-08-05 14:14 -0700
Message-ID<mailman.2977.1344201252.4697.python-list@python.org>
In reply to#26566
Im using Textwrangler and thats the only text editor that im using just saying for everyone

[toc] | [prev] | [next] | [standalone]


#26606

Fromalex23 <wuwei23@gmail.com>
Date2012-08-05 19:49 -0700
Message-ID<7da28dee-0767-4da2-b70b-5f85804ce727@sn4g2000pbc.googlegroups.com>
In reply to#26567
On Aug 6, 7:14 am, John Mordecai Dildy <jdild...@gmail.com> wrote:
> Im using Textwrangler and thats the only text editor that im using just saying for everyone

Why bother using an actual development tool when you can get an entire
mailing list to be your syntax checker, right?

[toc] | [prev] | [next] | [standalone]


#26568

FromJohn Mordecai Dildy <jdildy85@gmail.com>
Date2012-08-05 14:14 -0700
Message-ID<a58ebcb9-72c9-4d6a-bd38-892e191426af@googlegroups.com>
In reply to#26566
Im using Textwrangler and thats the only text editor that im using just saying for everyone

[toc] | [prev] | [next] | [standalone]


#26589

From"William R. Wing" <wrw@mac.com> (Bill Wing)
Date2012-08-05 19:38 -0400
Message-ID<mailman.2987.1344213549.4697.python-list@python.org>
In reply to#26568
On Aug 5, 2012, at 5:14 PM, John Mordecai Dildy <jdildy85@gmail.com> wrote:

> Im using Textwrangler and thats the only text editor that im using just saying for everyone
> -- 
> http://mail.python.org/mailman/listinfo/python-list

(With apologies, I initially sent this privately to John, and not to the list.)

As I'm sure you are aware, TextWrangler is the free baby brother of BBEdit which, although not free, contains automatic syntax highlighting for exactly the sort of error you made.  It would have signaled "unmatched parentheses" the instant you finished inputting that line in your original bit of code.  If you value your time, I think you will find it more than pays for itself.

Just saying…
-Bill

[toc] | [prev] | [next] | [standalone]


#26569

FromAndre Ramaciotti <andre@ramaciotti.com>
Date2012-08-05 18:22 -0300
Message-ID<mailman.2978.1344201749.4697.python-list@python.org>
In reply to#26559
On 08/05/2012 06:12 PM, MRAB wrote:
> On 05/08/2012 22:03, Tim Chase wrote:
>> On 08/05/12 15:52, John Mordecai Dildy wrote:
>>> Current Problem at the moment
>>>
>>> Traceback (most recent call last):
>>>   File "ex26.py", line 66, in <module>
>>>     beans, jars, crates = secret_formula(start-point)
>>> NameError: name 'start' is not defined
>>>
>>> anyone know how to make start defined
>>
>> "start-point" is not a valid identifier as the "-" isn't permitted
>> in a variable name.  This is the case for just about every language
>> out there.  HTML/XML & CSS are the only languages that come to my
>> mind in which the dash is considered a valid part of an identifier.
>>
> I believe that Cobol allows "-"  in names.
>
Lisp certainly does.

[toc] | [prev] | [next] | [standalone]


#26571

FromJohn Mordecai Dildy <jdildy85@gmail.com>
Date2012-08-05 15:00 -0700
Message-ID<mailman.2979.1344204050.4697.python-list@python.org>
In reply to#26569
since when did we start talking about lisp?

[toc] | [prev] | [next] | [standalone]


#26572

FromJohn Mordecai Dildy <jdildy85@gmail.com>
Date2012-08-05 15:00 -0700
Message-ID<b0a191ec-c688-4dfd-abff-0fc3335ff161@googlegroups.com>
In reply to#26569
since when did we start talking about lisp?

[toc] | [prev] | [next] | [standalone]


#26575

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2012-08-05 23:17 +0100
Message-ID<mailman.2982.1344205207.4697.python-list@python.org>
In reply to#26572
On 05/08/2012 23:00, John Mordecai Dildy wrote:
> since when did we start talking about lisp?
>

Just about anything is on topic here.

-- 
Cheers.

Mark Lawrence.

[toc] | [prev] | [next] | [standalone]


#26581

FromTim Chase <python.list@tim.thechases.com>
Date2012-08-05 18:19 -0500
Message-ID<mailman.2984.1344208723.4697.python-list@python.org>
In reply to#26572
On 08/05/12 17:00, John Mordecai Dildy wrote:
> since when did we start talking about lisp?

Though not a lisper, the Python tie-in was my reply:  Python (among
many other languages) doesn't allow a "-" as a character in
identifiers as you appeared to use it in your code.  Unlike HTML,
XML, CSS, and apparently lisp and COBOL (thanks, MRAB, for ripping
open that scab after years of trying to repress those COBOL memories
:-)   where identifiers may contain the dash.

-tkc

[toc] | [prev] | [next] | [standalone]


#26584

FromRoy Smith <roy@panix.com>
Date2012-08-05 19:32 -0400
Message-ID<roy-22E5A9.19322605082012@news.panix.com>
In reply to#26581
In article <mailman.2984.1344208723.4697.python-list@python.org>,
 Tim Chase <python.list@tim.thechases.com> wrote:

> On 08/05/12 17:00, John Mordecai Dildy wrote:
> > since when did we start talking about lisp?
> 
> Though not a lisper, the Python tie-in was my reply:  Python (among
> many other languages) doesn't allow a "-" as a character in
> identifiers as you appeared to use it in your code.  Unlike HTML,
> XML, CSS, and apparently lisp and COBOL (thanks, MRAB, for ripping
> open that scab after years of trying to repress those COBOL memories
> :-)   where identifiers may contain the dash.
> 
> -tkc

Does BNF count as a language?

[toc] | [prev] | [next] | [standalone]


#26599

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2012-08-05 21:15 -0400
Message-ID<mailman.2995.1344216015.4697.python-list@python.org>
In reply to#26584
On Sun, 05 Aug 2012 19:32:26 -0400, Roy Smith <roy@panix.com> declaimed
the following in gmane.comp.python.general:

> In article <mailman.2984.1344208723.4697.python-list@python.org>,
>  Tim Chase <python.list@tim.thechases.com> wrote:
> 
> > On 08/05/12 17:00, John Mordecai Dildy wrote:
> > > since when did we start talking about lisp?
> > 
> > Though not a lisper, the Python tie-in was my reply:  Python (among
> > many other languages) doesn't allow a "-" as a character in
> > identifiers as you appeared to use it in your code.  Unlike HTML,
> > XML, CSS, and apparently lisp and COBOL (thanks, MRAB, for ripping
> > open that scab after years of trying to repress those COBOL memories
> > :-)   where identifiers may contain the dash.
> > 
> > -tkc
> 
> Does BNF count as a language?

	It's a meta-language <G>
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#26600

FromTim Chase <python.list@tim.thechases.com>
Date2012-08-05 20:27 -0500
Message-ID<mailman.2996.1344216355.4697.python-list@python.org>
In reply to#26584
On 08/05/12 20:15, Dennis Lee Bieber wrote:
> On Sun, 05 Aug 2012 19:32:26 -0400, Roy Smith <roy@panix.com> declaimed
>>> Though not a lisper, the Python tie-in was my reply:  Python (among
>>> many other languages) doesn't allow a "-" as a character in
>>> identifiers as you appeared to use it in your code.  Unlike HTML,
>>> XML, CSS, and apparently lisp and COBOL (thanks, MRAB, for ripping
>>> open that scab after years of trying to repress those COBOL memories
>>> :-)   where identifiers may contain the dash.
>>
>> Does BNF count as a language?
> 
> 	It's a meta-language <G>

I see what you did there, using a dash in your identifier...

-tkc



[toc] | [prev] | [next] | [standalone]


#26590

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2012-08-06 00:42 +0000
Message-ID<501f1300$0$29867$c3e8da3$5496439d@news.astraweb.com>
In reply to#26581
On Sun, 05 Aug 2012 18:19:55 -0500, Tim Chase wrote:

> On 08/05/12 17:00, John Mordecai Dildy wrote:
>> since when did we start talking about lisp?
> 
> Though not a lisper, the Python tie-in was my reply:  Python (among many
> other languages) doesn't allow a "-" as a character in identifiers as
> you appeared to use it in your code.  Unlike HTML, XML, CSS, and
> apparently lisp and COBOL (thanks, MRAB, for ripping open that scab
> after years of trying to repress those COBOL memories :-)   where
> identifiers may contain the dash.

And Forth.

Generally speaking, concatenative languages like Forth can use any 
symbols they wish in identifiers, apart from the token separator (usually 
whitespace), since they don't have syntax as we know it in more 
traditional languages.

E.g. in Forth : is the word (command) to start defining a new word, but 
this does not stop you from defining a word called ::: or "foo:bar" (with 
or without the quotes!).



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#26675

FromJugurtha Hadjar <jugurtha.hadjar@gmail.com>
Date2012-08-07 04:06 +0100
Message-ID<mailman.3040.1344308766.4697.python-list@python.org>
In reply to#26559
On 08/05/2012 09:52 PM, John Mordecai Dildy wrote:
> NameError: name 'start' is not defined
>
> anyone know how to make start defined

Maybe rename it "defined_start" ;)

I wonder how someone can get to the point of writing more than 76 lines 
of code while not only still making this kind of errors, but not even 
knowing what these errors mean and how to correct them. It's impossible. 
You can't write programs that are more than 10 lines without having 
encountered these errors and learnt how to deal with them.

Unless you're reading exercises from a book, and feeling that you're 
"intermediate", you started reading from chapter 28 in a 29 chapters book.



-- 
~Jugurtha Hadjar,

[toc] | [prev] | [next] | [standalone]


#26684

Fromrusi <rustompmody@gmail.com>
Date2012-08-06 20:52 -0700
Message-ID<65361ea4-9740-49b1-93cc-29573ac8c27a@r2g2000pbn.googlegroups.com>
In reply to#26675
On Aug 7, 8:06 am, Jugurtha Hadjar <jugurtha.had...@gmail.com> wrote:
> On 08/05/2012 09:52 PM, John Mordecai Dildy wrote:
>
> > NameError: name 'start' is not defined
>
> > anyone know how to make start defined
>
> Maybe rename it "defined_start" ;)
>
> I wonder how someone can get to the point of writing more than 76 lines
> of code while not only still making this kind of errors, but not even
> knowing what these errors mean and how to correct them. It's impossible.
> You can't write programs that are more than 10 lines without having
> encountered these errors and learnt how to deal with them.
>
> Unless you're reading exercises from a book, and feeling that you're
> "intermediate", you started reading from chapter 28 in a 29 chapters book.
>
> --
> ~Jugurtha Hadjar,

If you've ever taught programming in a formal teaching setup, you
would not be surprised when students submit C 'projects' that wont
even compile (leave aside segfault).

On a more personal note, the first program I wrote was in Cobol.  I
got only 350 errors before the compiler copped out.  It was a bit
traumatic.  Later on I found I forgot to write
PROCEDURE DIVISION.

So its good to remember how spoilt we are on python that we can test
out 10 lines at a time.

[toc] | [prev] | [next] | [standalone]


#26727

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2012-08-07 12:27 -0400
Message-ID<mailman.3061.1344356852.4697.python-list@python.org>
In reply to#26684
On Mon, 6 Aug 2012 20:52:42 -0700 (PDT), rusi <rustompmody@gmail.com>
declaimed the following in gmane.comp.python.general:

> 
> On a more personal note, the first program I wrote was in Cobol.  I
> got only 350 errors before the compiler copped out.  It was a bit
> traumatic.  Later on I found I forgot to write
> PROCEDURE DIVISION.
>
	At least you didn't do what some girl did at my college... The
compiler listing got posted outside the computer room as a record for
compiler errors...

	She'd fed the OBJECT file to the COBOL compiler as the source.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#26576

FromJohn Mordecai Dildy <jdildy85@gmail.com>
Date2012-08-05 15:39 -0700
Message-ID<ecf55b11-53cb-4bf8-b0c4-12e58f8f8c0f@googlegroups.com>
In reply to#26547
oh

[toc] | [prev] | [next] | [standalone]


#26626

FromEthan Furman <ethan@stoneleaf.us>
Date2012-08-06 09:05 -0700
Message-ID<mailman.3010.1344268604.4697.python-list@python.org>
In reply to#26547
John Mordecai Dildy wrote:
> I am currently using python 2.6 and am not going to install the newer versions of python and i am looking for people that are still using ver 2.6 in python to help with with the code line:
> 
> sentence = "All good things come to those who wait."
> 
> then im getting this error message when i dont see the problem with it:
> 
>   File "ex26.py", line 77
>     sentence = "All good things come to those who wait."
>            ^
> SyntaxError: invalid syntax

John Mordecai Dildy wrote:
 > Current Problem at the moment
 >
 > Traceback (most recent call last):
 >   File "ex26.py", line 66, in <module>
 >     beans, jars, crates = secret_formula(start-point)
 > NameError: name 'start' is not defined
 >
 > anyone know how to make start defined

In your subject line you state that you are an intermediate Python user. 
  These are not the errors an intermediate user would make, nor the 
questions an intermediate user would ask.  These are the errors that 
somebody who doesn't know Python would make.

Please do not misrepresent yourself.

~Ethan~

P.S.  The scale I am accustomed to is Novice -> Intermediate -> Advanced 
-> Master

Are there scales out there that would put these types of questions in 
the "intermediate" category?

[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | comp.lang.python


csiph-web