[issue215900] difference between pre and sre for buggy expressions

2022-04-10 Thread admin
Change by admin : -- github: None -> 33257 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue462270] sub-tle difference between pre and sre

2022-04-10 Thread admin
Change by admin : -- github: None -> 35187 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue215900] difference between pre and sre for buggy expressions

2022-04-10 Thread admin
Change by admin : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue215894] Difference between dos_8x3 and dos-8x3

2022-04-10 Thread admin
Change by admin : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue215894] Difference between dos_8x3 and dos-8x3

2022-04-10 Thread admin
Change by admin : -- github: None -> 33255 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14336] Difference between pickle implementations for function objects

2021-12-10 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix stage: -> resolved status: pending -> closed ___ Python tracker ___ ___

[issue36099] Clarify the difference between mu and xbar in the statistics documentation

2021-08-20 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> clarify meaning of xbar and mu in pvariance/variance of statistics module ___ Python tracker

Re: Subtle difference between any(a list) and any(a generator) with Python 3.9

2021-07-29 Thread Chris Angelico
On Fri, Jul 30, 2021 at 5:40 AM Terry Reedy wrote: > Since the 'two ways' involve the new :=, I have no idea what 'two ways' > and 'same result' you mean before :=. > I'm not sure, but I think that a lot of people read patch notes as if they say "this is how everyone needs to do things now", and

Re: Subtle difference between any(a list) and any(a generator) with Python 3.9

2021-07-29 Thread Terry Reedy
On 7/29/2021 5:39 AM, Unknown wrote: Hello Reading PEP572 about Python 3.9 assignment expressions, I discovered a subtle difference between any(a list) and any(a generator) see: >>> lines = ["azerty", "#qsdfgh", "wxcvbn"] >>> any((comment

Re: Subtle difference between any(a list) and any(a generator) with Python 3.9

2021-07-29 Thread Chris Angelico
On Thu, Jul 29, 2021 at 7:49 PM ast wrote: > > Hello > > Reading PEP572 about Python 3.9 assignment expressions, > I discovered a subtle difference between any(a list) > and any(a generator) > > see: > > >>> lines = ["azerty", "#qsdf

Subtle difference between any(a list) and any(a generator) with Python 3.9

2021-07-29 Thread ast
Hello Reading PEP572 about Python 3.9 assignment expressions, I discovered a subtle difference between any(a list) and any(a generator) see: >>> lines = ["azerty", "#qsdfgh", "wxcvbn"] >>> any((comment := line).startswith('#') for line in line

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 390bfe044531a813722919933116ed37fe321861 by Miss Islington (bot) in branch '3.9': bpo-23750: Document os-system, subprocess. Patch by Martin Panter. (GH-26016) (GH-26041)

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread Senthil Kumaran
Change by Senthil Kumaran : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 6fc6f4366d02412e3424d2a6da43a28d8f479d7b by Miss Islington (bot) in branch '3.10': bpo-23750: Document os-system, subprocess. Patch by Martin Panter. (GH-26016) (GH-26040)

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +24685 pull_request: https://github.com/python/cpython/pull/26040 ___ Python tracker

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +24686 pull_request: https://github.com/python/cpython/pull/26041 ___ Python tracker ___

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: Does anyone know what the return value 768 signify here? -- nosy: +orsenthil ___ Python tracker ___

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-10 Thread So Ukiyama
So Ukiyama added the comment: I created a PR which apply Martin Panter's patch. So If I have offended you with my rudeness, I hope you will forgive me for taking this down. -- ___ Python tracker

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-10 Thread So Ukiyama
Change by So Ukiyama : -- nosy: +uniocto nosy_count: 4.0 -> 5.0 pull_requests: +24666 pull_request: https://github.com/python/cpython/pull/26016 ___ Python tracker ___

[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-04-28 Thread Irit Katriel
Irit Katriel added the comment: The patch needs to be converted to a github PR. -- keywords: +easy nosy: +iritkatriel title: Clarify difference between os.system/subprocess.call in section "Replacing os.system()" -> doc: Clarify difference between os.system/su

[issue27886] Docs: the difference between Path.rename() and Path.replace() is not obvious

2021-03-12 Thread Eryk Sun
ry (Lib) title: Docs: the difference between rename and replace is not obvious -> Docs: the difference between Path.rename() and Path.replace() is not obvious versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker <https://

[issue27886] Docs: the difference between rename and replace is not obvious

2021-03-12 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg273845 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue17437] Difference between open and codecs.open

2020-11-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue42320] unexpected difference between map and list

2020-11-11 Thread Pierre van de Laar
Pierre van de Laar added the comment: Not a bug: tuple is an iterator but an iterator is not a tuple. Yet iterators are often accepted during initialization... -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python

[issue42320] unexpected difference between map and list

2020-11-11 Thread Pierre van de Laar
Pierre van de Laar added the comment: Zip didn't contain the test cases from the tests directory (sorry for that) -- Added file: https://bugs.python.org/file49592/tests.zip ___ Python tracker

[issue42320] unexpected difference between map and list

2020-11-11 Thread Pierre van de Laar
have unfortunately not have time to make a small reproducer. So I just send the whole project. -- files: bug.zip messages: 380742 nosy: Pierre van de Laar priority: normal severity: normal status: open title: unexpected difference between map and list type: behavior versions: Python 3.9

[issue27886] Docs: the difference between rename and replace is not obvious

2020-10-28 Thread Ezio Melotti
Change by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Puzzling difference between lists and tuples

2020-09-21 Thread Chris Angelico
On Mon, Sep 21, 2020 at 10:14 PM Serhiy Storchaka wrote: > > 18.09.20 03:55, Chris Angelico пише: > > On Fri, Sep 18, 2020 at 10:53 AM Grant Edwards > > wrote: > >> Yea, the syntax for tuple literals has always been a bit of an ugly > >> spot in Python. If ASCII had only had one more set of

Re: Puzzling difference between lists and tuples

2020-09-21 Thread Serhiy Storchaka
18.09.20 03:55, Chris Angelico пише: > On Fri, Sep 18, 2020 at 10:53 AM Grant Edwards > wrote: >> Yea, the syntax for tuple literals has always been a bit of an ugly >> spot in Python. If ASCII had only had one more set of open/close >> brackets... > > ... then I'd prefer them to be used for

Re: Puzzling difference between lists and tuples

2020-09-20 Thread Cameron Simpson
On 20Sep2020 20:33, Avi Gross wrote: >('M','R','A','B') is correct. I appreciate the correction. I did not look to >see the content of what I created, just the type! > a = tuple("first") a >('f', 'i', 'r', 's', 't') type(a) > > >But I thought adding a comma would help and it does

RE: Puzzling difference between lists and tuples

2020-09-20 Thread Avi Gross via Python-list
st',) I understand the design choice and can imagine there may be another function that initializes a tuple more directly in some module. Returning to lurking mode ... -Original Message----- From: Python-list On Behalf Of MRAB Sent: Sunday, September 20, 2020 7:35 PM To: python-list@python.org Su

Re: Puzzling difference between lists and tuples

2020-09-20 Thread Greg Ewing
On 21/09/20 10:59 am, Avi Gross wrote: a=tuple("first") type(a) That seems more explicit than adding a trailing comma. It doesn't do what you want, though: >>> a = tuple("first") >>> print(a) ('f', 'i', 'r', 's', 't') If you really want to use tuple() to create a 1-tuple without using a

Re: Puzzling difference between lists and tuples

2020-09-20 Thread MRAB
On 2020-09-20 23:59, Avi Gross via Python-list wrote: There is a simple and obvious way to make sure you have a tuple by invoking the keyword/function in making it: a=('first') type(a) a=("first",) type(a) a=tuple("first") type(a) That seems more explicit than adding a trailing

RE: Puzzling difference between lists and tuples

2020-09-20 Thread Avi Gross via Python-list
re explicit than adding a trailing comma. It also is a simple way to make an empty tuple but is there any penalty for using the function tuple()? -Original Message- From: Python-list On Behalf Of "???" Sent: Saturday, September 19, 2020 11:39 PM To: python-list@python.or

sorry for typo (Was: Re: Puzzling difference between lists and tuples)

2020-09-19 Thread 황병희
> #+BEGIN_SRC: python > for n in ('first',): > print n > #+BEGIN_SRC The last 'BEGIN_SRC' should be 'END_SRC' so sorry ;;; -- ^고맙습니다 _救濟蒼生_ 감사합니다_^))// -- https://mail.python.org/mailman/listinfo/python-list

Re: Puzzling difference between lists and tuples

2020-09-19 Thread 황병희
William Pearson writes: > ... > for n in ('first'): > print n > > > ... but "f","i","r","s","t" in the second. #+BEGIN_SRC: python for n in ('first',): print n #+BEGIN_SRC Then, that will print 'first'. And please use Python3... Sincerely, Byung-Hee -- ^고맙습니다 _救濟蒼生_ 감사합니다_^))// --

Re: Puzzling difference between lists and tuples

2020-09-18 Thread Greg Ewing
On 19/09/20 6:49 am, Grant Edwards wrote: There must be a few more sets of brackets in Unicode... Quite a lot, actually. The character browser in MacOSX is currently showing me 17, not including the ones that are built up from multiple characters. Some of them could be easily confused with

Re: Puzzling difference between lists and tuples

2020-09-18 Thread Grant Edwards
On 2020-09-18, Chris Angelico wrote: > On Fri, Sep 18, 2020 at 10:53 AM Grant Edwards > wrote: >> >> On 2020-09-17, MRAB wrote: >> >> The only time the parentheses are required for tuple building is when >> >> they would otherwise not be interpreted that way: >> >> >> > They're needed for the

Re: Puzzling difference between lists and tuples

2020-09-17 Thread Chris Angelico
On Fri, Sep 18, 2020 at 10:53 AM Grant Edwards wrote: > > On 2020-09-17, MRAB wrote: > >> The only time the parentheses are required for tuple building is when > >> they would otherwise not be interpreted that way: > >> > > They're needed for the empty tuple, which doesn't have a comma. > > > >>

Re: Puzzling difference between lists and tuples

2020-09-17 Thread Grant Edwards
On 2020-09-17, MRAB wrote: >> The only time the parentheses are required for tuple building is when >> they would otherwise not be interpreted that way: >> > They're needed for the empty tuple, which doesn't have a comma. > >> some_func('first', 'second') # some_func called with two str args

Re: Puzzling difference between lists and tuples

2020-09-17 Thread Ethan Furman
On 9/17/20 10:43 AM, MRAB wrote: On 2020-09-17 17:47, Ethan Furman wrote: The only time the parentheses are required for tuple building is when they would otherwise not be interpreted that way: They're needed for the empty tuple, which doesn't have a comma. Ah, right. Thanks. -- ~Ethan~

Re: Puzzling difference between lists and tuples

2020-09-17 Thread MRAB
On 2020-09-17 17:47, Ethan Furman wrote: On 9/17/20 8:24 AM, William Pearson wrote: I am puzzled by the reason for this difference between lists and tuples. A list of with multiple strings can be reduced to a list with one string with the expected results: for n in ['first']: print n

Re: Puzzling difference between lists and tuples

2020-09-17 Thread Richard Damon
On 9/17/20 11:24 AM, William Pearson wrote: > I am puzzled by the reason for this difference between lists and tuples. > > A list of with multiple strings can be reduced to a list with one string with > the expected results: > > for n in ['first','second']: > print n

Re: Puzzling difference between lists and tuples

2020-09-17 Thread Ethan Furman
On 9/17/20 8:24 AM, William Pearson wrote: I am puzzled by the reason for this difference between lists and tuples. A list of with multiple strings can be reduced to a list with one string with the expected results: for n in ['first']: print n ['first'] is a list. for n in ('first

Re: Puzzling difference between lists and tuples

2020-09-17 Thread 2QdxY4RzWzUUiLuE
On 2020-09-17 at 09:24:57 -0600, William Pearson wrote: > for n in ('first'): That's not a tuple. That's a string. Try it this way: for n in ('first',): # note the trailing comma print n Dan -- https://mail.python.org/mailman/listinfo/python-list

Puzzling difference between lists and tuples

2020-09-17 Thread William Pearson
I am puzzled by the reason for this difference between lists and tuples. A list of with multiple strings can be reduced to a list with one string with the expected results: for n in ['first','second']: print n for n in ['first']: print n The first loop prints "first"

matplotlib: Difference between Axes and AxesSubplot

2020-04-28 Thread ast
Hello It's not clear to me what the differences between Axes and AxesSubplot classes are AxesSubplot is a sub class of Axes It is possible to draw in objects of both type with plot, scatter ... Axes object seems to be able to be inserted in AxesSubplot object (It is strange because

Re: Is there a difference between python

2020-04-06 Thread Eryk Sun
On 4/5/20, Malcolm Greene wrote: > Is there a difference between the following 2 ways to launch a console-less > script under Windows? > > python

Re: Is there a difference between python

2020-04-05 Thread David L Neil via Python-list
On 6/04/20 10:35 AM, Malcolm Greene wrote: Is there a difference between the following 2 ways to launch a console-less script under Windows? python

Re: Is there a difference between python

2020-04-05 Thread Mike Dewhirst
On 6/04/2020 8:35 am, Malcolm Greene wrote: Is there a difference between the following 2 ways to launch a console-less script under Windows? python

Is there a difference between python

2020-04-05 Thread Malcolm Greene
Is there a difference between the following 2 ways to launch a console-less script under Windows? python

Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-13 Thread Marco Sulla
Well, I suppose we have a winner: pyperf_bench_3_8_gcc_9_2.json = Performance version: 1.0.0 Report on Linux-4.15.0-76-generic-x86_64-with-glibc2.27 Number of logical CPUs: 4 Start date: 2020-03-13 19:36:17.585796 End date: 2020-03-13 20:35:09.605718

Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-02 Thread Skip Montanaro via Python-list
> > Have you compiled it optimized (--enable-optimizations --with-lto)? > Nope, just ./configure. Further investigation is left as an exercise for the reader. :-) Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-02 Thread Marco Sulla via Python-list
Oooohhh uff, I have to install latest clang... or better, compile it as I did for gcc. And I have to read the install docs to see if there's some trick to optimize it... and I have to read the docs of pyperformance too (I only used pyperf until now)... Oh well, tomorrow :-D On Mon, 2 Mar

Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-01 Thread Skip Montanaro via Python-list
I didn't have clang installed. It was just "sudo apt install clang-8". From there all I had to do was build Python from scratch twice, install pyperformance using pip after the first build, then run it after each build. It's not difficult. Going beyond that right now is not an itch I need to

Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-01 Thread Marco Sulla via Python-list
Good! Have you compiled it optimized (--enable-optimizations --with-lto)? On Sun, 1 Mar 2020 at 23:48, Skip Montanaro wrote: > > > As title. Currently I'm using gcc 9.2.0 and its compilation seems to > > work well and fast. But I would know by your experience if clang can > > produce, on a *nix

Re: Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-01 Thread Skip Montanaro
> As title. Currently I'm using gcc 9.2.0 and its compilation seems to > work well and fast. But I would know by your experience if clang can > produce, on a *nix system, a "faster Python". I took a quick run at this as I was wanting to give pyperformance a

Have you some experience / link about difference between Python builded with gcc and clang?

2020-03-01 Thread Marco Sulla via Python-list
As title. Currently I'm using gcc 9.2.0 and its compilation seems to work well and fast. But I would know by your experience if clang can produce, on a *nix system, a "faster Python". -- https://mail.python.org/mailman/listinfo/python-list

Re: Difference between os.path.isdir and Path.is_dir

2019-12-14 Thread Kirill Balunov
Yeah it is True, for the last two weeks or so I can access bugs.python.org in normal way. But I totally agree with the site that the best description of this situation is "Yet". with kind regards, -gdg сб, 14 дек. 2019 г. в 19:46, Terry Reedy : > On 7/26/2019 3:12 AM, Kirill Balunov wrote: > >

Re: Difference between os.path.isdir and Path.is_dir

2019-12-14 Thread Terry Reedy
On 7/26/2019 3:12 AM, Kirill Balunov wrote: чт, 25 июл. 2019 г. в 20:28, eryk sun : On 7/25/19, Kirill Balunov wrote: import os from pathlib import Path dummy = " " # or "" or " " os.path.isdir(dummy) False Path(dummy).is_dir() True I can't reproduce the above result in either

Re: What's the difference between running a script under command box and interpreter?

2019-11-04 Thread jfong
Grant Edwards於 2019年11月5日星期二 UTC+8上午12時41分24秒寫道: > On 2019-11-04, Dennis Lee Bieber wrote: > > Using > > > >from module import * > > > > is often the worst thing one can do. > > I agree 100%. > > Unfortunately, most of the official standard library documentation is > written assuming you do

Re: What's the difference between running a script under command box and interpreter?

2019-11-04 Thread MRAB
On 2019-11-04 21:05, Peter J. Holzer wrote: On 2019-11-03 16:34:39 -0800, jf...@ms4.hinet.net wrote: I innocently thought that when import module through "from test import *", I am working on test's globals under REPL. I didn't noticed the REPL has its own globals. Well, you imported every

Re: What's the difference between running a script under command box and interpreter?

2019-11-04 Thread Peter J. Holzer
On 2019-11-03 16:34:39 -0800, jf...@ms4.hinet.net wrote: > I innocently thought that when import module through "from test import > *", I am working on test's globals under REPL. I didn't noticed the > REPL has its own globals. Well, you imported every global from test. So you are (kind of)

Re: What's the difference between running a script under command box and interpreter?

2019-11-04 Thread Grant Edwards
On 2019-11-04, Dennis Lee Bieber wrote: > Using > >from module import * > > is often the worst thing one can do. I agree 100%. Unfortunately, most of the official standard library documentation is written assuming you do _exactly_that_. Though it makes the documetnation more succinct, I

Re: What's the difference between running a script under command box and interpreter?

2019-11-03 Thread Chris Angelico
ely execute code > > as part of a module. If you start with "-i somescript.py", it starts > > out by running the contents of that script; otherwise, you start with > > nothing (as if you ran "-i empty-file.py"). The REPL does the same > > thing every tim

Re: What's the difference between running a script under command box and interpreter?

2019-11-03 Thread jfong
ses me that REPL has essential different behavior in these two > > situations. > > > > Not really. In each case, the REPL lets you interactively execute code > as part of a module. If you start with "-i somescript.py", it starts > out by running the contents of tha

Re: What's the difference between running a script under command box and interpreter?

2019-11-03 Thread Chris Angelico
PL lets you interactively execute code as part of a module. If you start with "-i somescript.py", it starts out by running the contents of that script; otherwise, you start with nothing (as if you ran "-i empty-file.py"). The REPL does the same thing every time; it'

Re: What's the difference between running a script under command box and interpreter?

2019-11-03 Thread jfong
Chris Angelico於 2019年11月4日星期一 UTC+8上午8時43分07秒寫道: > On Mon, Nov 4, 2019 at 11:36 AM wrote: > > > > Peter J. Holzer於 2019年11月4日星期一 UTC+8上午3時59分36秒寫道: > > > On 2019-11-01 04:24:38 -0700, jf...@ms4.hinet.net wrote: > > > > > The globals are your current module's namespace, and functions defines > > >

Re: What's the difference between running a script under command box and interpreter?

2019-11-03 Thread Cameron Simpson
On 03Nov2019 16:34, Jach Fong wrote: Peter J. Holzer於 2019年11月4日星期一 UTC+8上午3時59分36秒寫道: It's not really "the interpreter" (I think you mean the REPL) which has it's own globals. Every module/file has its own globals. The same thing happens non-interactively: % cat test.py def main():

Re: What's the difference between running a script under command box and interpreter?

2019-11-03 Thread Chris Angelico
On Mon, Nov 4, 2019 at 11:36 AM wrote: > > Peter J. Holzer於 2019年11月4日星期一 UTC+8上午3時59分36秒寫道: > > On 2019-11-01 04:24:38 -0700, jf...@ms4.hinet.net wrote: > > > > The globals are your current module's namespace, and functions defines > > > > in a module are bound to that module's namespace. > > >

Re: What's the difference between running a script under command box and interpreter?

2019-11-03 Thread jfong
Peter J. Holzer於 2019年11月4日星期一 UTC+8上午3時59分36秒寫道: > On 2019-11-01 04:24:38 -0700, jf...@ms4.hinet.net wrote: > > > The globals are your current module's namespace, and functions defines > > > in a module are bound to that module's namespace. > > > > > > Strip your test.py back. A lot. Try this:

Re: What's the difference between running a script under command box and interpreter?

2019-11-03 Thread Peter J. Holzer
On 2019-11-01 04:24:38 -0700, jf...@ms4.hinet.net wrote: > > The globals are your current module's namespace, and functions defines > > in a module are bound to that module's namespace. > > > > Strip your test.py back. A lot. Try this: > > > > def main(): > > print(rule) > > > > Now,

Re: What's the difference between running a script under command box and interpreter?

2019-11-01 Thread jfong
Cameron Simpson於 2019年11月1日星期五 UTC+8下午5時28分42秒寫道: > On 31Oct2019 22:03, Jach Fong wrote: > >Cameron Simpson於 2019年11月1日星期五 UTC+8下午12時13分45秒寫道: > >> On 31Oct2019 20:44, Jach Fong wrote: > >> >The script test.py is something like this: > >> >---test.py > >> >from pyeds import fsm > >> >... >

Re: What's the difference between running a script under command box and interpreter?

2019-11-01 Thread Cameron Simpson
On 31Oct2019 22:03, Jach Fong wrote: Cameron Simpson於 2019年11月1日星期五 UTC+8下午12時13分45秒寫道: On 31Oct2019 20:44, Jach Fong wrote: >The script test.py is something like this: >---test.py >from pyeds import fsm >... >class Rule_Parse: >def __init__(self): >... >

Re: What's the difference between running a script under command box and interpreter?

2019-10-31 Thread jfong
Cameron Simpson於 2019年11月1日星期五 UTC+8下午12時13分45秒寫道: > On 31Oct2019 20:44, Jach Fong wrote: > >The script test.py is something like this: > >---test.py > >from pyeds import fsm > >... > >... > >class Rule_Parse: > >def __init__(self): > >... > >self.current_char = '' > >...

Re: What's the difference between running a script under command box and interpreter?

2019-10-31 Thread Cameron Simpson
On 31Oct2019 20:44, Jach Fong wrote: The script test.py is something like this: ---test.py from pyeds import fsm ... ... class Rule_Parse: def __init__(self): ... self.current_char = '' ... ... def main(input_str): for c in input_str: ... rule.current_char

What's the difference between running a script under command box and interpreter?

2019-10-31 Thread jfong
The script test.py is something like this: ---test.py from pyeds import fsm ... ... class Rule_Parse: def __init__(self): ... self.current_char = '' ... ... def main(input_str): for c in input_str: ... rule.current_char = c ... if __name__ ==

RE: What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread wesley
n.org (mailto:python-list@python.org) Betreff: What is the Difference Between quit() and exit() commands in Python? What is the Difference Between quit() and exit() commands in Python? -- mail.python.org/mailman/listinfo/python-list (https://mail.python.org/mailman/listinfo/python-list; target=&q

Re: What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread Eryk Sun
On 9/16/19, Hongyi Zhao wrote: > > What is the Difference Between quit() and exit() commands in Python? They're different instances of the Quitter class, which is available if site.py is imported (i.e. not with the -S command-line option). They're created by site.setquit(): def s

Re: What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread Peter Otten
Hongyi Zhao wrote: > What is the Difference Between quit() and exit() commands in Python? They are instances of the same type >>> import inspect >>> type(quit) is type(exit) True >>> print(inspect.getsource(type(quit))) class Quitter(object): def __init__(self,

What is the Difference Between quit() and exit() commands in Python?

2019-09-16 Thread Hongyi Zhao
What is the Difference Between quit() and exit() commands in Python? -- https://mail.python.org/mailman/listinfo/python-list

Re: Difference between os.path.isdir and Path.is_dir

2019-07-26 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 20:28, eryk sun : > On 7/25/19, Kirill Balunov wrote: > > > import os > from pathlib import Path > dummy = " " # or "" or " " > os.path.isdir(dummy) > > False > Path(dummy).is_dir() > > True > > I can't reproduce the above result in either

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Cameron Simpson
On 26Jul2019 03:43, Chris Angelico wrote: On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: On 7/25/19, Kirill Balunov wrote: import os from pathlib import Path dummy = " " # or "" or " " os.path.isdir(dummy) > False Path(dummy).is_dir() > True I can't reproduce

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Cameron Simpson
On 25Jul2019 13:40, eryk sun wrote: Windows trims trailing spaces and dots from the final component of a path, unless we use a non-normalized \\?\ path. Hoo! Well, that explains some extremely weird NAS behaviour I encountered the other month with some paths ending in spaces. (My machine

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 6:13 AM Kirill Balunov wrote: > > > > чт, 25 июл. 2019 г. в 22:58, Chris Angelico : >> >> On Fri, Jul 26, 2019 at 5:52 AM Kirill Balunov >> wrote: >> [...] >> > No, it's not just because of curiosity. I will try to tell the background, >> > and maybe I went the wrong

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 22:58, Chris Angelico : > On Fri, Jul 26, 2019 at 5:52 AM Kirill Balunov > wrote: > [...] > > No, it's not just because of curiosity. I will try to tell the > background, and maybe I went the wrong way initially. There is a very cool > project https://github.com/3b1b/manim,

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 5:52 AM Kirill Balunov wrote: > > > > чт, 25 июл. 2019 г. в 19:16, Chris Angelico : >> >> On Fri, Jul 26, 2019 at 1:30 AM Kirill Balunov >> wrote: >> > >> > Hi all! It is expected that: >> > ``` >> > >>> import os >> > >>> from pathlib import Path >> > >>> dummy = " "

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 19:16, Chris Angelico : > On Fri, Jul 26, 2019 at 1:30 AM Kirill Balunov > wrote: > > > > Hi all! It is expected that: > > ``` > > >>> import os > > >>> from pathlib import Path > > >>> dummy = " " # or "" or " " > > >>> os.path.isdir(dummy) > > False > > >>>

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 20:28, eryk sun : > On 7/25/19, Kirill Balunov wrote: > > > import os > from pathlib import Path > dummy = " " # or "" or " " > os.path.isdir(dummy) > > False > Path(dummy).is_dir() > > True > > I can't reproduce the above result in either

Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Maksim Fomin via Python-list
‐‐‐ Original Message ‐‐‐ On Thursday, July 25, 2019 3:27 PM, Kirill Balunov wrote: > Hi all! It is expected that: > > >>> import os > >>> from pathlib import Path > >>> dummy = " " # or "" or " " > >>> os.path.isdir(dummy) > > False > >>>

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread eryk sun
On 7/25/19, Chris Angelico wrote: > On Fri, Jul 26, 2019 at 3:54 AM eryk sun wrote: > >> That's what I said. But the OP shows os.path.isdir(" ") == False and >> Path(" ").is_dir() == True, which is what I cannot reproduce and >> really should not be able to reproduce, unless there's a bug >>

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 3:54 AM eryk sun wrote: > > On 7/25/19, Chris Angelico wrote: > > On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: > >> > >> On 7/25/19, Kirill Balunov wrote: > >> > > >> import os > >> from pathlib import Path > >> dummy = " " # or "" or " " > >>

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread eryk sun
On 7/25/19, Chris Angelico wrote: > On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: >> >> On 7/25/19, Kirill Balunov wrote: >> > >> import os >> from pathlib import Path >> dummy = " " # or "" or " " >> os.path.isdir(dummy) >> > False >> Path(dummy).is_dir() >> >

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: > > On 7/25/19, Kirill Balunov wrote: > > > import os > from pathlib import Path > dummy = " " # or "" or " " > os.path.isdir(dummy) > > False > Path(dummy).is_dir() > > True > > I can't reproduce the above result in

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread eryk sun
On 7/25/19, Kirill Balunov wrote: > import os from pathlib import Path dummy = " " # or "" or " " os.path.isdir(dummy) > False Path(dummy).is_dir() > True I can't reproduce the above result in either Linux or Windows. The results should only be different for an

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 1:30 AM Kirill Balunov wrote: > > Hi all! It is expected that: > ``` > >>> import os > >>> from pathlib import Path > >>> dummy = " " # or "" or " " > >>> os.path.isdir(dummy) > False > >>> Path(dummy).is_dir() > True > ``` > > or was it overlooked? > Was not aware

Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
Hi all! It is expected that: ``` >>> import os >>> from pathlib import Path >>> dummy = " " # or "" or " " >>> os.path.isdir(dummy) False >>> Path(dummy).is_dir() True ``` or was it overlooked? with kind regards, -gdg -- https://mail.python.org/mailman/listinfo/python-list

Re: Difference between array( [1,0,1] ) and array( [ [1,0,1] ] )

2019-06-22 Thread Markos
e: vector_3.shape (2,3) As the external list has 2 elements that is two sublists each with 3 elements. The vector_2 case is just when the external list has only 1 element. I hope it is more clear now. Cherrs, Il giorno venerdì 21 giugno 2019 08:29:36 UTC+2, Markos ha scritto: Hi

Re: Difference between array( [1,0,1] ) and array( [ [1,0,1] ] )

2019-06-21 Thread MRAB
On 2019-06-21 02:39, Markos wrote: Hi, I'm studying Numpy and I don't understand the difference between vector_1 = np.array( [ 1,0,1 ] ) with 1 bracket and vector_2 = np.array( [ [ 1,0,1 ] ] ) with 2 brackets The shape of vector_1 is: vector_1.shape (3,) But the shape of vector_2

Re: Difference between array( [1,0,1] ) and array( [ [1,0,1] ] )

2019-06-21 Thread edmondo . giovannozzi
Keep also in mind that numpy is quite different from Matlab. In Matlab every vaiable is a matrix of at least 2 dimensions. This is not the case of numpy (and is not the case in Fortran too). every array can have a different number of dimensions. The transposition of an array with just 1

  1   2   3   4   5   6   7   8   9   10   >