Re: Silly newbie question - Carrot character (^)

2010-11-08 Thread Seebs
On 2010-11-09, Lawrence D'Oliveiro wrote: > In message , Dennis Lee > Bieber wrote: >> Have you ever looked at the reference manual for Ada? > Or even worse, the annotated reference. I thought annotations were supposed > to clarify things; in this case they seemed to have the opposite effect...

Re: Silly newbie question - Carrot character (^)

2010-11-08 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > On Sat, 6 Nov 2010 10:22:47 -0400, Philip Semanchuk > declaimed the following in > gmane.comp.python.general: > >> Some people might think the language ref> is a fine place to direct >> newcomers to Python. I don't. It's not awful, but it's dense and >>

Re: Silly newbie question - Carrot character (^)

2010-11-07 Thread Philip Semanchuk
On Nov 6, 2010, at 10:45 AM, D'Arcy J.M. Cain wrote: > On Sat, 6 Nov 2010 10:22:47 -0400 > Philip Semanchuk wrote: >>> The tutorial isn't meant as an exhaustive lesson on every single Python >>> feature. >> >> I agree, and I don't expect otherwise. My point was that if the >> tutorial doesn't

Re: Silly newbie question - Carrot character (^)

2010-11-07 Thread Seebs
On 2010-11-07, Roy Smith wrote: > Well, maybe I was being a little sarcastic. The real point was that if > you make it hard for people to do the right thing (i.e. look up the > details in the reference manual), you should not be surprised if they do > the wrong thing (i.e. find some way to mak

Re: Silly newbie question - Carrot character (^)

2010-11-07 Thread Mark Wooding
Nobody writes: > You're taking "how" too literally, so let me rephrase that: > > A reference manual tells you what you need to know in order to use > the language. A specification tells you what you need to know in > order to implement it. I still don't see those as being different. A lan

Re: Silly newbie question - Carrot character (^)

2010-11-07 Thread Roy Smith
In article , Seebs wrote: > On 2010-11-07, Roy Smith wrote: > > Any self-respecting C++ programmer would have given > > up the scavenger hunt by now. Just kept throwing typecasts at your code > > until it compiles, and move on. > > That does not sound like a self-respecting programmer of an

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Seebs
On 2010-11-07, Nobody wrote: > I'm arguing that the reference manual reads too much like a specification. > E.g. look at "5.2.4. List displays" and tell me whether you consider that > it adequately /explains/ list displays to someone wishing to use them. Seems pretty explanatory to me. I mean, m

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Nobody
On Sun, 07 Nov 2010 00:06:25 +, Steven D'Aprano wrote: >> A reference manual tells you how to use the language. A specification >> tells you how to implement it. > > Surely a tutorial tells you *how* to use the language. I wouldn't expect > a reference manual to teach me how to run and edit

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Seebs
On 2010-11-07, Roy Smith wrote: > Any self-respecting C++ programmer would have given > up the scavenger hunt by now. Just kept throwing typecasts at your code > until it compiles, and move on. That does not sound like a self-respecting programmer of anything. -s -- Copyright 2010, all wrong

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Roy Smith
In article <87fwve53ve@xemacs.org>, Hrvoje Niksic wrote: > It's not a matter of quality, but of intended audience. To most > ordinary programmers the standards documents such as the C standard, the > C++ standard, or the Python reference are quite dense and hard to use as > a reference, and

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Seebs
On 2010-11-07, Hrvoje Niksic wrote: > It's not a matter of quality, but of intended audience. To most > ordinary programmers the standards documents such as the C standard, the > C++ standard, or the Python reference are quite dense and hard to use as > a reference, and yet they are considered qu

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Hrvoje Niksic
Seebs writes: > On 2010-11-06, Hrvoje Niksic wrote: >> I don't speak for "Nobody", but to me a reference manual would be a >> document intended for the user of the language. The thing for the >> language lawyer is something intended for the implementor, or possibly >> for the very advanced user

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Seebs
On 2010-11-07, Steven D'Aprano wrote: > Surely a tutorial tells you *how* to use the language. I wouldn't expect > a reference manual to teach me how to run and edit programs -- the *how* > of using the language. There's a sort of fuzzy boundary about how the term "reference manual" is used. S

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Mark Wooding
Steven D'Aprano writes: > If you want to argue that the Python reference manual is aimed at the > wrong level of sophistication, specifically that the BNF syntax stuff > should be ripped out into another document, then I might agree with > you. But to argue that it's entirely the wrong "kind" of

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Steven D'Aprano
On Sat, 06 Nov 2010 23:19:18 +, Nobody wrote: > On Fri, 05 Nov 2010 22:51:10 +, Seebs wrote: > >>> IMHO, the lack of a reference manual for the language itself is a >>> major hole in Python's documentation. >> >> I'm a bit lost here. Could you highlight some of the differences >> betwee

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Nobody
On Fri, 05 Nov 2010 22:51:10 +, Seebs wrote: >> IMHO, the lack of a reference manual for the language itself is a major >> hole in Python's documentation. > > I'm a bit lost here. Could you highlight some of the differences between > "a reference manual for the language itself" and "somethin

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Seebs
On 2010-11-06, rantingrick wrote: > On Nov 5, 5:51?pm, Seebs wrote: >> I'm a bit lost here. ?Could you highlight some of the differences >> between "a reference manual for the language itself" and "something >> written for language lawyers"? > In a word HUMOR! Huh? > Obviously the commentator

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Steve Holden
On 11/6/2010 10:45 AM, D'Arcy J.M. Cain wrote: >> I realize that the Python Foundation doesn't have infinite resources >> > to work with, so maybe they'd love to create & maintain a more readable >> > language reference if they had time/money/people. I don't hear anyone >> > talk about it, though.

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread rantingrick
On Nov 5, 5:51 pm, Seebs wrote: > On 2010-11-05, Nobody wrote: > > > However, it's still written for language lawyers. > > IMHO, the lack of a reference manual for the language itself is a major > > hole in Python's documentation. > > I'm a bit lost here.  Could you highlight some of the differen

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Ned Deily
In article <11a0f261-1bf4-4c35-83fa-c47bf968d...@semanchuk.com>, Philip Semanchuk wrote: > On Nov 6, 2010, at 12:33 AM, Steven D'Aprano wrote: > > On Fri, 05 Nov 2010 23:21:11 -0400, Philip Semanchuk wrote: > > > >> Take the OP's question. How is one supposed to find out about bitwise > >> opera

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Seebs
On 2010-11-06, Hrvoje Niksic wrote: > I don't speak for "Nobody", but to me a reference manual would be a > document intended for the user of the language. The thing for the > language lawyer is something intended for the implementor, or possibly > for the very advanced user who argues with the i

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread D'Arcy J.M. Cain
On Sat, 6 Nov 2010 10:22:47 -0400 Philip Semanchuk wrote: > > The tutorial isn't meant as an exhaustive lesson on every single Python > > feature. > > I agree, and I don't expect otherwise. My point was that if the > tutorial doesn't mention a feature, the only other place to learn about > it (o

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Philip Semanchuk
On Nov 6, 2010, at 12:33 AM, Steven D'Aprano wrote: > On Fri, 05 Nov 2010 23:21:11 -0400, Philip Semanchuk wrote: > >> Take the OP's question. How is one supposed to find out about bitwise >> operators in Python? AFAICT they're not mentioned in the tutorial, and >> neither are decorators, assert

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Hrvoje Niksic
Seebs writes: > I'm a bit lost here. Could you highlight some of the differences > between "a reference manual for the language itself" and "something > written for language lawyers"? I don't speak for "Nobody", but to me a reference manual would be a document intended for the user of the langu

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Tim Chase
On 11/05/10 23:33, Steven D'Aprano wrote: As far as the OP's question, I'm kind of surprised that he wasn't told that Google is his friend. The very first hit for "python caret" answers his question. If he had spent even five seconds googling, he would have got his answer. http://www.google.co.u

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Steven D'Aprano
On Sat, 06 Nov 2010 04:33:25 +, Steven D'Aprano wrote: > As far as the OP's question, I'm kind of surprised that he wasn't told > that Google is his friend. The very first hit for "python caret" answers > his question. If he had spent even five seconds googling, he would have > got his answer.

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Steven D'Aprano
On Fri, 05 Nov 2010 23:21:11 -0400, Philip Semanchuk wrote: > Take the OP's question. How is one supposed to find out about bitwise > operators in Python? AFAICT they're not mentioned in the tutorial, and > neither are decorators, assert(), global, exec, the ternary if > statement, etc. The tutor

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Seebs
On 2010-11-06, Philip Semanchuk wrote: > The former refers to something that programmers would use to learn >the language once they've gone through the tutorial a few times. >The latter is great for writing a Python parser but isn't the >friendliest guide to language constructs. That sounds, then

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Philip Semanchuk
On Nov 5, 2010, at 6:51 PM, Seebs wrote: > On 2010-11-05, Nobody wrote: >> However, it's still written for language lawyers. > >> IMHO, the lack of a reference manual for the language itself is a major >> hole in Python's documentation. > > I'm a bit lost here. Could you highlight some of the

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Steven D'Aprano
On Fri, 05 Nov 2010 22:51:10 +, Seebs wrote: > On 2010-11-05, Nobody wrote: >> However, it's still written for language lawyers. > >> IMHO, the lack of a reference manual for the language itself is a major >> hole in Python's documentation. > > I'm a bit lost here. Could you highlight some

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Seebs
On 2010-11-05, Nobody wrote: > However, it's still written for language lawyers. > IMHO, the lack of a reference manual for the language itself is a major > hole in Python's documentation. I'm a bit lost here. Could you highlight some of the differences between "a reference manual for the langu

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Philip Semanchuk
On Nov 5, 2010, at 5:21 PM, Nobody wrote: > On Fri, 05 Nov 2010 10:12:05 -0400, Philip Semanchuk wrote: > >> As others have said, ^ is for XOR. That's buried here in the >> documentation: >> http://docs.python.org/release/2.7/reference/... >> >> Not that I would have expected you to find it the

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Nobody
On Fri, 05 Nov 2010 10:12:05 -0400, Philip Semanchuk wrote: > As others have said, ^ is for XOR. That's buried here in the > documentation: > http://docs.python.org/release/2.7/reference/... > > Not that I would have expected you to find it there since that's pretty > dense. In fact, older versio

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Terry Reedy
On 11/5/2010 9:43 AM, Matty Sarro wrote: Hey Everyone, Just curious - I'm working on a program which includes a calculation of a circle, and I found myself trying to use pi*radius^2, and getting errors that data types float and int are unsupported for "^". Now, I realized I was making the mistake

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Matty Sarro
It's ok, people who refer to a labret piercing as a "la-BRAY" piercing are also incorrect. It's pronounced lab-RET, as its base word is the latin "labretta." French as a language shall doom us all :) On Fri, Nov 5, 2010 at 2:54 PM, Philip Semanchuk wrote: > > On Nov 5, 2010, at 12:43 PM, Peter Pe

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Philip Semanchuk
On Nov 5, 2010, at 12:43 PM, Peter Pearson wrote: > On Fri, 5 Nov 2010 10:12:05 -0400, Philip Semanchuk wrote: >> >> BTW the more common name for this character is caret (ka-RAY). > > Yes, it's caret, but no, it's KA-rit, almost the same as > carrot. It's straight from Latin, with no detour th

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Peter Pearson
On Fri, 5 Nov 2010 10:12:05 -0400, Philip Semanchuk wrote: > > BTW the more common name for this character is caret (ka-RAY). Yes, it's caret, but no, it's KA-rit, almost the same as carrot. It's straight from Latin, with no detour through French. -- To email me, substitute nowhere->spamcop, in

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Philip Semanchuk
On Nov 5, 2010, at 9:43 AM, Matty Sarro wrote: > Hey Everyone, > Just curious - I'm working on a program which includes a calculation of a > circle, and I found myself trying to use pi*radius^2, and getting errors > that data types float and int are unsupported for "^". Now, I realized I was > ma

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Matty Sarro
Thanks everyone, that explains it :) -Matty On Fri, Nov 5, 2010 at 9:43 AM, Matty Sarro wrote: > Hey Everyone, > Just curious - I'm working on a program which includes a calculation of a > circle, and I found myself trying to use pi*radius^2, and getting errors > that data types float and int ar

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Shashwat Anand
On Fri, Nov 5, 2010 at 7:26 PM, Krister Svanlund wrote: > On Fri, Nov 5, 2010 at 2:43 PM, Matty Sarro wrote: > > Hey Everyone, > > Just curious - I'm working on a program which includes a calculation of a > > circle, and I found myself trying to use pi*radius^2, and getting errors > > that data

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread D'Arcy J.M. Cain
On Fri, 5 Nov 2010 09:43:25 -0400 Matty Sarro wrote: > now working. However, what exactly does ^ do? I know its used in regular > expressions but I can't seem to find anything about using it as an operator. It's the XOR operator. Try "help('^')" for more detail. By the way, it's "caret", not "c

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Daniel Urban
> However, what exactly does ^ do? Bitwise XOR: http://docs.python.org/py3k/reference/expressions.html#binary-bitwise-operations -- http://mail.python.org/mailman/listinfo/python-list

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Vlastimil Brom
2010/11/5 Matty Sarro : > Hey Everyone, > Just curious - I'm working on a program which includes a calculation of a > circle, and I found myself trying to use pi*radius^2, and getting errors > that data types float and int are unsupported for "^". Now, I realized I was > making the mistake of using

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Krister Svanlund
On Fri, Nov 5, 2010 at 2:43 PM, Matty Sarro wrote: > Hey Everyone, > Just curious - I'm working on a program which includes a calculation of a > circle, and I found myself trying to use pi*radius^2, and getting errors > that data types float and int are unsupported for "^". Now, I realized I was >

Silly newbie question - Carrot character (^)

2010-11-05 Thread Matty Sarro
Hey Everyone, Just curious - I'm working on a program which includes a calculation of a circle, and I found myself trying to use pi*radius^2, and getting errors that data types float and int are unsupported for "^". Now, I realized I was making the mistake of using '^' instead of "**". I've correct