error

2019-07-27 Thread
다운로드를  하고 있는데 파이썬이 열리지가 않습니다.다운로드를 하고 있는 도중에 문제가 난듯이 파이썬이 안 열립니다.

Windows 10용 메일에서 보냄

-- 
https://mail.python.org/mailman/listinfo/python-list


a problem in Libs installs

2019-07-27 Thread Ali Keshavarz Nasab
Hi dear Mr/Maddam
When I install some libs in CMD or Power shield the error is appeared: “Running 
setup.py install for pillow ... error”. Whats the solution and what is the best 
way to install Libs? I use 3.8.0b2 version. What is the best editor for python?
Thanks alot

Sent from Mail for Windows 10

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: a problem in Libs installs

2019-07-27 Thread MRAB

On 2019-07-27 12:31, Ali Keshavarz Nasab wrote:

Hi dear Mr/Maddam
When I install some libs in CMD or Power shield the error is appeared: “Running 
setup.py install for pillow ... error”. Whats the solution and what is the best 
way to install Libs? I use 3.8.0b2 version. What is the best editor for python?

Python 3.8 is a beta version, not the final version. It's better to use 
Python 3.7 for now.


Did you use "pip" to install Pillow?

Probably the best way to install Pillow is to use the Python launcher 
and the pip module:


py -3.7 -m pip install pillow

(if you're using Python 3.7)

As for the best editor, that depends on your preferences and whether you 
want a free one or are willing to pay.


I use EditPad Pro (the paid version), but EditPad Lite is free.

Or you could use Notepad++, or Visual Studio Code.

Pick one that features syntax colouring, and, preferably, one that lets 
you run the program directly from the editor and can capture any output 
(very useful).

--
https://mail.python.org/mailman/listinfo/python-list


Definite or indefinite article for non-singletons?

2019-07-27 Thread Chris Angelico
When talking about indistinguishable objects, is it correct to talk
about "the " or "an "?

Example:

def f(s):
"""Frob a thing.

If s is an empty string, frobs all the things.
OR
If s is the empty string, frobs all the things.
"""

It's entirely possible that a Python implementation will optimize
small strings and thus have exactly one empty string, but it's also
entirely possible to have multiple indistinguishable empty strings.
Grammatically, is it better to think of empty strings as an entire
category of object, and you were passed one from that category ("an
empty string"), or to think of zero-length instances of 'str' as being
implementation details referring to the one and only Platonic "empty
string"?

Does it make a difference to usage if the object is mutable? For
instance, would you say "the empty string" but "an empty set"?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Definite or indefinite article for non-singletons?

2019-07-27 Thread Cameron Simpson

On 28Jul2019 07:10, Chris Angelico  wrote:

When talking about indistinguishable objects, is it correct to talk
about "the " or "an "?

Example:

def f(s):
   """Frob a thing.

   If s is an empty string, frobs all the things.
   OR
   If s is the empty string, frobs all the things.
   """

It's entirely possible that a Python implementation will optimize
small strings and thus have exactly one empty string, but it's also
entirely possible to have multiple indistinguishable empty strings.
Grammatically, is it better to think of empty strings as an entire
category of object, and you were passed one from that category ("an
empty string"), or to think of zero-length instances of 'str' as being
implementation details referring to the one and only Platonic "empty
string"?


It depends. If the API _specifies_ that something is a singleton then 
I'd use its proper name (eg None or ClassName.SENTINEL or whatever) and 
use a definite article (eg "the queue is considered closed when the 
sentinel is received").



Does it make a difference to usage if the object is mutable? For
instance, would you say "the empty string" but "an empty set"?


If the implementation _may_ fold indistinguishable things together I'd 
speak to the case that it may not, and say "if the string is empty", 
which (a) sidesteps whether there's only one empty string instance and 
(b) talks about the criterion for the decision and not some 
implementation artifact.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


Re: Definite or indefinite article for non-singletons?

2019-07-27 Thread Ethan Furman

On 07/27/2019 02:10 PM, Chris Angelico wrote:


When talking about indistinguishable objects, is it correct to talk
about "the " or "an "?


Multiple indistinguishable objects are still multiple, so "an".

Implementation details should only enter the conversation when specifically 
discussing the implementation -- so CPython is an implementation detail while 
Python is the language.

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


Re: Definite or indefinite article for non-singletons?

2019-07-27 Thread Mirko via Python-list
Am 27.07.2019 um 23:10 schrieb Chris Angelico:
> When talking about indistinguishable objects, is it correct to talk
> about "the " or "an "?
> 
> Example:
> 
> def f(s):
> """Frob a thing.
> 
> If s is an empty string, frobs all the things.
> OR
> If s is the empty string, frobs all the things.
> """
> 
> It's entirely possible that a Python implementation will optimize
> small strings and thus have exactly one empty string, but it's also
> entirely possible to have multiple indistinguishable empty strings.
> Grammatically, is it better to think of empty strings as an entire
> category of object, and you were passed one from that category ("an
> empty string"), or to think of zero-length instances of 'str' as being
> implementation details referring to the one and only Platonic "empty
> string"?
> 
> Does it make a difference to usage if the object is mutable? For
> instance, would you say "the empty string" but "an empty set"?
> 
> ChrisA
> 


Quite frankly, even as a professional (german) writer and texter
(but hobby-programmer), I consider this question to be an
exaggeration about a very minor grammatical aspect. Yes, it makes a
difference if you are allowed to eat *an* apple or *this* apple
(*this* apple might be mine). But, I hobby-program since 20 years or
so, but I can not remember a situation, where a documentation that
confused "an" with "this" caused any troubles.

Anyway:


Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x=""
>>> y=""
>>> x is y
True


Jython 2.5.3 (, Sep 21 2017, 03:12:48)
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_131
Type "help", "copyright", "credits" or "license" for more information.
>>> x=""
>>> y=""
>>> x is y
False


So, obviously there are multiple empty strings possible, so I'd
write "an".

HTH
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Definite or indefinite article for non-singletons?

2019-07-27 Thread Terry Reedy

On 7/27/2019 5:10 PM, Chris Angelico wrote:

When talking about indistinguishable objects, is it correct to talk
about "the " or "an "?

Example:

def f(s):
 """Frob a thing.

 If s is an empty string, frobs all the things.
 OR
 If s is the empty string, frobs all the things.
 """


Depends on whether one is using 'is' in the Python sense of object 
identify or the natural language sense of value equality.  To evade, 
avoid the (an?) article.


If string s is empty,...

I think we tend to be clearer about numbers.

x is an instance of 3.14.
x is a float equal to 3.14.
x is the number 3.14.
x is the float 3.14.


It's entirely possible that a Python implementation will optimize
small strings and thus have exactly one empty string, but it's also
entirely possible to have multiple indistinguishable empty strings.
Grammatically, is it better to think of empty strings as an entire
category of object, and you were passed one from that category ("an
empty string"), or to think of zero-length instances of 'str' as being
implementation details referring to the one and only Platonic "empty
string"?

Does it make a difference to usage if the object is mutable? For
instance, would you say "the empty string" but "an empty set"?


In mathematics, *every* set is 'the'.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Definite or indefinite article for non-singletons?

2019-07-27 Thread DL Neil

On 28/07/19 9:10 AM, Chris Angelico wrote:

When talking about indistinguishable objects, is it correct to talk
about "the " or "an "?
Example:
def f(s):
 """Frob a thing.
 If s is an empty string, frobs all the things.
 OR
 If s is the empty string, frobs all the things.
 """
It's entirely possible that a Python implementation will optimize
small strings and thus have exactly one empty string, but it's also
entirely possible to have multiple indistinguishable empty strings.
Grammatically, is it better to think of empty strings as an entire
category of object, and you were passed one from that category ("an
empty string"), or to think of zero-length instances of 'str' as being
implementation details referring to the one and only Platonic "empty
string"?
Does it make a difference to usage if the object is mutable? For
instance, would you say "the empty string" but "an empty set"?



Python:

Immutable:
>>> NULSTRING = ""
>>> A_NULSTRING = ""
>>> THE_NULSTRING = ""
>>> id( NULSTRING )
139654031453296
>>> id( A_NULSTRING )
139654031453296 <<< it's all the same, to me!
>>> id( THE_NULSTRING )
139654031453296 <<< they're all the same, to me?

Mutable:
>>> ONE = 1
>>> A_ONE = 1
>>> THE_ONE = 1
>>> id( ONE )
139654256829664
>>> id( A_ONE )
139654256829664 <<< likewise
>>> id( THE_ONE )
139654256829664

>>> ONE = 1 + 1
>>> id( ONE )
139654256829696 <<< as you'd expect
>>> id( A_ONE )
139654256829664
>>> id( THE_ONE)
139654256829664

>>> ONE = 1
>>> id(ONE)
139654256829664 <<< did you expect this?

There is only a/the ONE way.
Disclaimer: I am not Dutch!


English:

Whilst the formalities of English grammar distinguish the specific 
("the") from the general case ("a" or "an"), eg "the Python language" cf 
"a programming language". Spoken or colloquial English can be quite 
different from academically-correct text - and in this case is!

(he says dangling a participle to demonstrate)

Whereas the indefinite article can only be used in the singular, the 
definite article may be used as both singular and plural.


A NULSTRING
THE ONESIE
THE ONESIES

(a choice of 'article' which will enrage both grammarians and 
fashionistas, in equal measure!*)

* oops, did you notice that it is "measure" and not "measures"?


If you were verbally suggesting an API to someone else, eg

class API(): def __init__( self, path="" ): ...

Would you use either the definite or indefinite article?

Trick question!

The unequivocal answer is: "neither"! We would say "default id to 
NULSTRING".

(similarly: "default [int value] to ONE")


When you advise this other person, and when (s)he writes such code, do 
any of us care whether all NULSTRING-s have the same id() or not? When 
speaking, not! When typing, not!
(and I venture to suggest, there'd be very few occasions when someone, 
suffering tight memory constraint*, went through counting NULSTRING-s 
seeking re-factor potential!)


PS should that be "constraint" because there's only one, ie "memory"; or 
"constraints"?



English is a ghastly language to learn because of its many irregular 
forms. The issue here is less about the preceding article, and more 
about the noun, ie NULSTRING, ONE, etc.


Some nouns are positively confusing, eg "jeans". How many pairs of 
trousers/pants are there? (and then there is the same problem with the 
word "trousers", or if you prefer "pants"!) Few people wear more than 
one - at the same time. Yet we still say "jeans" as if the two legs are 
not somehow part of the single item.


Other nouns are written as if plural but are only used in the singular, 
eg maths. If you only attend the one course, how many maths courses do 
you attend? Did you really think mathematics a precise science? (or 
should that have been "precise sciences"?)
NB American English (English people reel in 'shock, horror') appears 
more correct in preferring the term "math" - but before anyone becomes 
too cocky, try "physics"!


Thus George Bernard Shaw's claim that the two nations are "divided by 
the use of a common language", and the virtue of non-native speakers 
learning "Globish" or similar.



To really confuse language-learners, we only need to add "collective 
nouns", eg "team" - they're enough to make one feel sheep-ish. (Ho ho!) 
Oh look, we're back to the question: is it "a team" or "the team"?



Aren't most of us happy with the article-free wording?

We should be concerned for "ONE" because as Harry Nilsson said, it is 
"the loneliest number"!


I'll become concerned for you, should you start to look too closely at 
the concept of a NULSTRING (None, "infinite", ...). If you look into it 
too deeply, you will realised that you are standing on the edge of an 
abyss, and the roaring noise in your ears/an ear/the ears comes from the 
black hole, which is about to swallow you up, never to return* to us again!

(*from an/the institution caring for the mentally-ill)...


Yours sincerely, 

Re: Swiss Ephemeris

2019-07-27 Thread prithwis
Hello Peter

I too was looking for a pythonic implementation of Swiss Ephemeris and arrived 
at https://pypi.python.org/pypi/pyswisseph

After some fiddling around with the various parameters, I have finally made it 
work to calculate Ayanamsa, Planetary Body Positions & Speed and Ascendant ( 
which is essentially what  I need for Indic Astrology )

If you want to see a working demo of the entire software please check my Google 
Colab Notebook located at http://bit.ly/2yhu9Cz

In case you are not aware, Colab is free hosted environment for running python 
program on an Ubuntu platform. 

Cheers

Prithwis

On Sunday, April 9, 2017 at 11:23:45 PM UTC+5:30, Peter Henry wrote:
> Hi Group
> 
> I have a package that has been altered to imported in to python, however I 
> tired to get is working but without success I be missing something obvious
> 
> The Swiss Ephemeris enable planetary coordinate  to be imported and used in 
> your program
> 
> Files access https://pypi.python.org/pypi/pyswisseph
> 
> Many thanks in advance 
> 
> Peter
-- 
https://mail.python.org/mailman/listinfo/python-list