Re: What is the meaning of @@?

2017-12-22 Thread Ian Kelly
@@ is a syntax error. Where did you encounter this? On Fri, Dec 22, 2017 at 10:38 PM, Peng Yu wrote: > Hi, I only can find the doc for @. What does @@ mean in python? > > -- > Regards, > Peng > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/

Re: What is the meaning of @@?

2017-12-22 Thread Steve D'Aprano
On Sat, 23 Dec 2017 04:38 pm, Peng Yu wrote: > Hi, I only can find the doc for @. What does @@ mean in python? I don't think that @@ means anything yet. There was a proposal to use @@ for matrix exponentiation in Numpy, as @ is used for matrix multiplication, but that was left on hold to see whe

Re: Why are both locals() and globals() set?

2017-12-22 Thread Steve D'Aprano
On Sat, 23 Dec 2017 03:01 pm, Peng Yu wrote: > Hi, The following example shows that both locals() and globals() are > updated when x and f are defined. Shouldn't they be considered and > global variable and functions only? Why does it make sense to set > locals() as well? Thanks. There are three

What is the meaning of @@?

2017-12-22 Thread Peng Yu
Hi, I only can find the doc for @. What does @@ mean in python? -- Regards, Peng -- https://mail.python.org/mailman/listinfo/python-list

Re: Where is ^ (symmetric_difference) documented in help()?

2017-12-22 Thread Steve D'Aprano
On Sat, 23 Dec 2017 03:50 pm, Peng Yu wrote: > Where is it documented that __xor__ and ^ is the same as > symmetric_difference? Thanks. You read https://docs.python.org/2/library/stdtypes.html#set to learn that ^ is the same as symmetric difference, and then read: https://docs.python.org/2/re

Re: Where is ^ (symmetric_difference) documented in help()?

2017-12-22 Thread Steve D'Aprano
On Sat, 23 Dec 2017 02:35 pm, Peng Yu wrote: > Hi, I see the following two lines are the same. But I'd like to find > where ^ is documented via the help() function (I am not looking for > the document in html)? Does anybody know? Thanks. > > s.symmetric_difference(t) > s ^ t You can call: help

Re: Where is ^ (symmetric_difference) documented in help()?

2017-12-22 Thread Peng Yu
Where is it documented that __xor__ and ^ is the same as symmetric_difference? Thanks. BTW, I am using to Python 2, your help message is different from mine. Do you use Python 3? On Fri, Dec 22, 2017 at 9:41 PM, Dan Sommers wrote: > On Fri, 22 Dec 2017 21:35:53 -0600, Peng Yu wrote: > >> Hi, I s

Why are both locals() and globals() set?

2017-12-22 Thread Peng Yu
Hi, The following example shows that both locals() and globals() are updated when x and f are defined. Shouldn't they be considered and global variable and functions only? Why does it make sense to set locals() as well? Thanks. $ cat ./main.py #!/usr/bin/env python # vim: set noexpandtab tabstop=

Re: Where is ^ (symmetric_difference) documented in help()?

2017-12-22 Thread Dan Sommers
On Fri, 22 Dec 2017 21:35:53 -0600, Peng Yu wrote: > Hi, I see the following two lines are the same. But I'd like to find > where ^ is documented via the help() function (I am not looking for > the document in html)? Does anybody know? Thanks. > > s.symmetric_difference(t) > s ^ t It's sort of d

Where is ^ (symmetric_difference) documented in help()?

2017-12-22 Thread Peng Yu
Hi, I see the following two lines are the same. But I'd like to find where ^ is documented via the help() function (I am not looking for the document in html)? Does anybody know? Thanks. s.symmetric_difference(t) s ^ t -- Regards, Peng -- https://mail.python.org/mailman/listinfo/python-list

Re: Python bug report

2017-12-22 Thread Peter Pearson
On Thu, 21 Dec 2017 23:54:17 +0100, Ranya wrote: > Hi, > Am trying to use clr.AddReference and clr.AddReferenceToFile, but > python(2.7) keeps making this error: > > Traceback (most recent call last): > File "", line 1, in > clr.AddReference("UnityEngine")AttributeError: 'module' object has

Re: co-ordianate transformation with astropy

2017-12-22 Thread mm0fmf
On 22/12/2017 21:36, hemanta phurailatpam wrote: I want to do co-ordinate transformation from earth-frame to equatorial frame. By entering date and time, I want to get RA(right ascension) and Dec(declination) wrt to equatorial frame. How do I do it? How would you do it by hand? -- https://m

plot map wit box axes

2017-12-22 Thread jorge . conrado
Hi, I use the PYTHON and IDL. In IDL I can plot a grid map like a this figure (mapa.png). Please, I would like know how can I plot my figure using PYTHON with the box around the figure. Like this that I plot using the IDL. Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: Why "flat is better than nested"?

2017-12-22 Thread Steve D'Aprano
On Sat, 23 Dec 2017 01:48 am, andrewpat...@gmail.com wrote: > On Monday, October 25, 2010 at 11:07:42 AM UTC+1, kj wrote: >> In "The Zen of Python", one of the "maxims" is "flat is better than >> nested"? Why? Can anyone give me a concrete example that illustrates >> this point? >> >> TIA! >>

Re: Why "flat is better than nested"?

2017-12-22 Thread andrewpate08
On Monday, October 25, 2010 at 11:07:42 AM UTC+1, kj wrote: > In "The Zen of Python", one of the "maxims" is "flat is better than > nested"? Why? Can anyone give me a concrete example that illustrates > this point? > > TIA! > > ~kj > > PS: My question should not be construed as a defense for "

Re: Using the variable type annotation syntax as a placeholder in a nonlocal scope?

2017-12-22 Thread Terry Reedy
On 12/22/2017 8:53 AM, Kirill Balunov wrote: On Dec 20, 2017 22:43, "Kirill Balunov" wrote: Since PEP 526 -- Syntax for Variable Annotations was approved, in Python 3.6+ it is possible to provide type hint information in the form *x: int*, also the

Re: Problem with assignment. Python error or mine?

2017-12-22 Thread Tim Williams
On Friday, December 22, 2017 at 8:41:29 AM UTC-5, Tim Williams wrote: > On Thursday, December 21, 2017 at 12:18:11 PM UTC-5, MarkA wrote: > > On Thu, 21 Dec 2017 07:05:33 -0800, rafaeltfreire wrote: > > From docs.python.org: > > > > 8.10. copy — Shallow and deep copy operations > > > > Source cod

Using the variable type annotation syntax as a placeholder in a nonlocal scope?

2017-12-22 Thread Kirill Balunov
Any suggestions? Thank you. With kind regards, -gdg On Dec 20, 2017 22:43, "Kirill Balunov" wrote: > I've asked the same question on StackOverflow, but it seems to me that it > is opinion based and will be ignored. So I ask for advice here: > > Since PEP 526 -- Syntax for Variable Annotations >

Re: Problem with assignment. Python error or mine?

2017-12-22 Thread Tim Williams
On Thursday, December 21, 2017 at 12:18:11 PM UTC-5, MarkA wrote: > On Thu, 21 Dec 2017 07:05:33 -0800, rafaeltfreire wrote: > From docs.python.org: > > 8.10. copy — Shallow and deep copy operations > > Source code: Lib/copy.py > > Assignment statements in Python do not copy objects, they create

Python bug report

2017-12-22 Thread Ranya
Hi, Am trying to use clr.AddReference and clr.AddReferenceToFile, but python(2.7) keeps making this error: Traceback (most recent call last): File "", line 1, in clr.AddReference("UnityEngine")AttributeError: 'module' object has no attribute 'AddReference' How can I fix this? Thanks in adv