Extract data

2018-05-15 Thread mahesh d
Hii. I have folder.in that folder some files .txt and some files .msg files. . My requirement is reading those file contents . Extract data in that files . -- https://mail.python.org/mailman/listinfo/python-list

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-05-15 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Or just remove it I updated the PR to do that. I didn't want to propose that initially because that patch was proposed here almost 2 years ago but not accepted. -- ___ Python tracker

[issue33513] incorrect detection of information of some distributions python2

2018-05-15 Thread Andrey Bychkov
New submission from Andrey Bychkov : In some linux distributions, the information about the distribution is incorrectly determined when the linux_distribution() method is called from the platform class. Since the information file os-release becomes a certain standard, I

[issue32485] Multiprocessing dict sharing between forked processes

2018-05-15 Thread Leonard Lausen
Change by Leonard Lausen : -- nosy: +Leonard Lausen ___ Python tracker ___ ___

Re: Extract data

2018-05-15 Thread Steven D'Aprano
On Tue, 15 May 2018 11:53:47 +0530, mahesh d wrote: > Hii. > > I have folder.in that folder some files .txt and some files .msg files. > . > My requirement is reading those file contents . Extract data in that > files . The answer to this question is the same as the answer to your previous

[issue33435] incorrect detection of information of some distributions

2018-05-15 Thread Andrey Bychkov
Andrey Bychkov added the comment: it's patch is not actual. new diff in git pull request! -- ___ Python tracker ___

[issue33513] incorrect detection of information of some distributions python2

2018-05-15 Thread Andrey Bychkov
Change by Andrey Bychkov : -- keywords: +patch Added file: https://bugs.python.org/file47590/fix-issue-33513.patch ___ Python tracker

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-15 Thread Steven D'Aprano
On Mon, 14 May 2018 21:24:01 -0400, Dennis Lee Bieber wrote: > The problem with adding the feature is that it will start to be > used by > newbies who lack the discipline to use it reliably: ensuring that > comparisons are coded with constants (which for Python really means > literals) on

[issue33486] regen autotools related files

2018-05-15 Thread Eitan Adler
Eitan Adler added the comment: > If these changes are autogenerated, I would prefer that a trusted core > developer create a PR. They are fully auto-generated (using autoupdate and autoreconf). It someone else wants to submit the PR, feel free. > Is it safe to bump the

[issue33506] [logging] template for filename timestamps

2018-05-15 Thread Vinay Sajip
Vinay Sajip added the comment: > Are you planning to remove the predefined filename templates No. They work fine as is for most people, from what I can tell. > it still has the limitation that when a logging file is active for writing > log events, that file always

[issue33486] regen autotools related files

2018-05-15 Thread Eitan Adler
Change by Eitan Adler : -- pull_requests: +6528 ___ Python tracker ___ ___

[issue33507] Improving the html rendered by cgitb.html

2018-05-15 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch pull_requests: +6529 stage: -> patch review ___ Python tracker ___

[issue33484] build system runs when it may merely link

2018-05-15 Thread Eitan Adler
Change by Eitan Adler : -- title: build system runs when it merely link -> build system runs when it may merely link ___ Python tracker

[issue33510] [logging] add JSON log formatter

2018-05-15 Thread Vinay Sajip
Vinay Sajip added the comment: > The solution recommended in the logging cookbook does not do the same thing > as I have proposed. Perhaps not, but it appears to adequately address your first point: > Many logging aggregation and indexing systems require that log

[issue33513] incorrect detection of information of some distributions python2

2018-05-15 Thread Andrey Bychkov
Change by Andrey Bychkov : -- pull_requests: +6530 stage: -> patch review ___ Python tracker ___

[issue33508] [logging] allow %p code to put PID into log filename

2018-05-15 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue33510] [logging] add JSON log formatter

2018-05-15 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue33506] [logging] template for filename timestamps

2018-05-15 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-05-15 Thread Eric Snow
Eric Snow added the comment: New changeset 6bd0c476c58ca0046969f70dc2a4e4dfb3268062 by Eric Snow in branch '3.7': bpo-32604: Remove xid registry. (#6813) https://github.com/python/cpython/commit/6bd0c476c58ca0046969f70dc2a4e4dfb3268062 --

[issue1322] Deprecate platform.dist() and platform.linux_distribution() functions

2018-05-15 Thread Petr Viktorin
Petr Viktorin added the comment: I talked to Ned, the release manager for 3.7. It's too late to remove this in 3.7, so I'll update the docs and make the deprecation notice more current/useful, and link to the distro library. --

Re: object types, mutable or not?

2018-05-15 Thread Mike McClain
On Sun, May 13, 2018 at 07:10:11PM -0400, Richard Damon wrote: > On 5/13/18 4:02 PM, Mike McClain wrote: > > I'm new to Python and OOP. > > Python en 2.7.14 Documentation The Python Language Reference > > 3. Data model > > 3.1. Objects, values and types > > An object's type is also unchangeable.

[issue33435] incorrect detection of information of some distributions

2018-05-15 Thread Petr Viktorin
Petr Viktorin added the comment: Oh, and there's a long discussion on the deprecation here: https://bugs.python.org/issue1322 -- ___ Python tracker

[issue33514] async and await as keywords not mentioned in What’s New In Python 3.7

2018-05-15 Thread Miro Hrončok
New submission from Miro Hrončok : According to PEP 492, async and await should be full keywords in Python 3.7. That happened in https://bugs.python.org/issue30406 There is no mention of it at all at https://docs.python.org/3.7/whatsnew/3.7.html#porting-to-python-3-7 or

[issue33514] async and await as keywords not mentioned in What’s New In Python 3.7

2018-05-15 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. The 3.7 What's New document is being completed right now at the PyCon US sprints. CCing the editors. -- nosy: +Elvis.Pranskevichus, ned.deily, yselivanov ___ Python tracker

[issue33515] subprocess.Popen on a Windows batch file always acts as if shell=True

2018-05-15 Thread Abigail
New submission from Abigail : It's possible to invoke an application without interpreting any of its arguments as shell magic: >>> print(subprocess.check_output(["C:/testapplication.exe", "foo", "&&", >>> "echo", "%PROGRAMFILES%"])) Hello world from application! 5

[issue33514] async and await as keywords not mentioned in What’s New In Python 3.7

2018-05-15 Thread Miro Hrončok
Miro Hrončok added the comment: Oh, didn't know that. Consider my PR as a remote sprint contribution. Hopefully nobody has already written this part. -- ___ Python tracker

[issue33516] unittest.mock: Add __round__ to supported magicmock methods

2018-05-15 Thread Martijn Pieters
New submission from Martijn Pieters : I notice that __trunc__, __floor__ and __ceil__ are supported methods for MagicMock, but __round__ (in the same grouping of numeric types emulation methods, see https://docs.python.org/3/reference/datamodel.html#object.__round__), is not.

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2018-05-15 Thread R. David Murray
R. David Murray added the comment: I should have just deleted the table, actually. The only important info in it is that per RFC '=', '=\n', and '= \n' all ought to become '='. But I don't think we should make that change, I think we should continue to turn those into

[issue21145] Add the @cached_property decorator

2018-05-15 Thread Omer Katz
Omer Katz added the comment: I believe so. Let's do it :) ‫בתאריך יום ב׳, 14 במאי 2018 ב-19:30 מאת ‪Carl Meyer‬‏ <‪ rep...@bugs.python.org‬‏>:‬ > > Carl Meyer added the comment: > > > I don't think it makes sense to try to make cached_property itself

[issue32769] Add 'annotations' to the glossary

2018-05-15 Thread Guido van Rossum
Guido van Rossum added the comment: I actually intended to say that annotations continue to be usable for non-typing purposes (beyond ClassVar/InitVar). It may be deprecated but the usage still exists. This is a glossary, not a manifesto. I'm fine with adding that the main

[issue33435] incorrect detection of information of some distributions

2018-05-15 Thread Petr Viktorin
Petr Viktorin added the comment: linux_distribution is deprecated since 3.5, so I don't think it makes sense to modify it. (see https://docs.python.org/3/library/platform.html#platform.linux_distribution) Can you use a third-party package instead, e.g. distro?

[issue33505] Optimize asyncio.ensure_future by reordering if conditions

2018-05-15 Thread Jimmy Lai
Jimmy Lai added the comment: Benchmark result: ./python.exe -m perf compare_to ensure_future_original.json ensure_future_optimized.json Mean +- std dev: [ensure_future_original] 57.4 ms +- 4.0 ms -> [ensure_future_optimized] 49.3 ms +- 4.5 ms: 1.17x faster (-14%)

Re: Read data from .msg all files

2018-05-15 Thread Grant Edwards
On 2018-05-15, mahesh d wrote: > import glob _Please_ stop creating new threads for this question. I think this is the fifth thread you've started for what appears to be a single question. -- Grant Edwards grant.b.edwardsYow! Like I always say

[issue33471] string format with 'n' failling with french locales

2018-05-15 Thread Licht Takeuchi
Change by Licht Takeuchi : -- keywords: +patch pull_requests: +6535 stage: -> patch review ___ Python tracker ___

What's the rationale for b"..." in this example?

2018-05-15 Thread Skip Montanaro
Consider this: >>> bytes("abc", encoding="utf-8") b'abc' Looks reasonable. Then consider this: >>> str(bytes("abc", encoding="utf-8")) "b'abc'" Why is the b'...' bit still there? I suppose it's because I didn't tell it explicitly how to decode the bytes object, as when I do, I get the expected

[issue33479] Document tkinter and threads

2018-05-15 Thread Mark Roseman
Mark Roseman added the comment: Hi Ivan, thanks for your detailed response. The approach you're suggesting ("Since the sole offender is their threading model, the way is to show them how it's defective and work towards improving it.") is in the end not something I think

[issue31947] names=None case is not handled by EnumMeta._create_ method

2018-05-15 Thread Ethan Furman
Ethan Furman added the comment: New changeset c50e5b1f1f2501f697aa52d9c9a440bdeced7006 by Ethan Furman (Miss Islington (bot)) in branch '3.6': bpo-31947: remove None default for names param in Enum._create_ GH-4288 (GH-6485)

[issue29640] _PyThreadState_Init and fork race leads to inconsistent key list

2018-05-15 Thread Petr Viktorin
Petr Viktorin added the comment: Not immediately, but it is on my TODO list. If anyone wants to tackle it in the mean time, I'd be happy to answer any questions -- ___ Python tracker

[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-15 Thread Paul Ganssle
Paul Ganssle added the comment: I don't really agree with these changes to the documentation. The format that paulc identifies is actually an RFC 3339 datetime, which is a subset of ISO 8601, to the extent that you consider the fact that "we're using RFC 3339" is "mutual

[issue33435] incorrect detection of information of some distributions

2018-05-15 Thread Andrey Bychkov
Andrey Bychkov added the comment: I think that it would be good to update linux_distribution, the discussion has been going on for a long time, but still in some cases the information is not determined correctly. It seems to me that the methods used are not entirely

[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : https://docs.python.org/3.7/library/stdtypes.html#mutable-sequence-types lists .copy() among the methods provided by mutable sequences. However, MutableSequence does not actually define .copy():

[issue33316] Windows: PyThread_release_lock always fails

2018-05-15 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: > So I would drop the pretense and make these fns void. Scratch that. In POSIX, they are #define'd as pthread fns which do return an error code. So, nothing more to do here. -- ___ Python

[issue28167] remove platform.linux_distribution()

2018-05-15 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 9eb40bc38de83e6ad3fad1931bba1cd36ae88c24 by Petr Viktorin (Matthias Bussonnier) in branch 'master': bpo-28167: bump platform.linux_distribution removal to 3.8 (GH-6669)

[issue33520] ast.Tuple has wrong col_offset

2018-05-15 Thread Isaiah Peng
New submission from Isaiah Peng : The `col_offset` of the ast.Tuple node is set to the column offset of the first element, shown in code: >>> a = "{1,2,3}" >>> b = ast.parse(a).body[0] >>>

[issue33451] Start pyc file lock the file

2018-05-15 Thread Jean-Louis Tamburini
Jean-Louis Tamburini added the comment: Same for python v3.6.5:f59c0932b4 -- Added file: https://bugs.python.org/file47592/dummy.py ___ Python tracker

[issue28167] remove platform.linux_distribution()

2018-05-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +6536 ___ Python tracker ___

[issue33514] async and await as keywords not mentioned in What’s New In Python 3.7

2018-05-15 Thread Miro Hrončok
Miro Hrončok added the comment: I'll prep a PR -- ___ Python tracker ___ ___

[issue32216] Document PEP 557 Data Classes (dataclasses module)

2018-05-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Mariatta, go ahead and take the lead on this one. -- ___ Python tracker ___

Uploading on PyPI fail

2018-05-15 Thread Vincent Vande Vyvre
Hi, Trying to upgrade a package on PyPI, I get this error: $ python3 setup.py register sdist upload ... Submitting dist/py3exiv2-0.3.0.tar.gz to https://pypi.python.org/pypi Upload failed (308): Redirect to Primary Domain error: Upload failed (308): Redirect to Primary Domain I know the site

Re: Extract data from multiple text files

2018-05-15 Thread Rhodri James
On 15/05/18 13:12, mahesh d wrote: import glob,os import errno path = 'C:/Users/A-7993\Desktop/task11/sample emails/' files = glob.glob(path) for file in os.listdir(path): print(file) if file.endswith(".txt"): print(os.path.join(path, file)) print(file)

[issue33517] dataclasses: Add the field type to Field repr

2018-05-15 Thread miss-islington
miss-islington added the comment: New changeset 5c7e079158db869c9ede1ac9b5b9735091d3ffb6 by Miss Islington (bot) in branch '3.7': bpo-33517: dataclasses: Add the field type to Field repr (GH-6858)

[issue33518] Add PEP to glossary

2018-05-15 Thread Andrés Delfino
New submission from Andrés Delfino : I think PEP should be mentioned in the glossary, as it is an important piece of how Python is developed and learned. The PR's wording is taken from PEP1, mostly verbatim. -- assignee: docs@python components: Documentation

[issue33513] incorrect detection of information of some distributions python2

2018-05-15 Thread Ned Deily
Change by Ned Deily : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing

[issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter

2018-05-15 Thread Amber Brown
Amber Brown added the comment: This change mirrors the default in FieldStorage (which it calls). If it's not the best option, then it would need to be changed in FieldStorage too. (personally, I don't like strict because UnicodeDecodeErrors on untrusted user input

[issue33198] Build on Linux with --enable-optimizations fails

2018-05-15 Thread Ned Deily
Ned Deily added the comment: Florian, any further information on this problem? Are you still seeing it? Can you supply a backtrace? Without more information to go on, there's not much we can do to help. -- nosy: +ned.deily ___

Extract data from multiple text files

2018-05-15 Thread mahesh d
import glob,os import errno path = 'C:/Users/A-7993\Desktop/task11/sample emails/' files = glob.glob(path) '''for name in files: print(str(name)) if name.endswith(".txt"): print(name)''' for file in os.listdir(path): print(file) if file.endswith(".txt"):

[issue32769] Add 'annotations' to the glossary

2018-05-15 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: What I think Guido might mean is that some type annotations are not strictly speaking type hints. For example, `dataclasses.InitVar`, is not really a type, it is just a way to indicate how constructor should be constructed. I could see

[issue33517] dataclasses: Add the field type to Field repr

2018-05-15 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +6532 stage: -> patch review ___ Python tracker ___

Re: Pandas cat.categories.isin list, is this a bug?

2018-05-15 Thread Matt Ruffalo
On 2018-05-15 06:23, Zoran Ljubišić wrote: > Matt, > > thanks for the info about pydata mailing group. I didn't know it exists. > Because comp.lang.python is not appropriate group for this question, I > will continue our conversation on gmail. > > I have put len(df.CRM_assetID.cat >

[issue33517] dataclasses: Add the field type to Field repr

2018-05-15 Thread Eric V. Smith
Change by Eric V. Smith : -- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33015] Fix function cast warning in thread_pthread.h

2018-05-15 Thread Siddhesh Poyarekar
Siddhesh Poyarekar added the comment: Actually it is not; the parameter passed to Pythread_start_new_thread has a different type (void (*)(void *)) from what's accepted (and executed by) pthread_create (void *(*)(void *)). That is undefined behaviour.

[issue32534] Speed-up list.insert: use memmove()

2018-05-15 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi, just a small reminder for this issue because I was reviewing the PR. what is the status? Thanks -- nosy: +matrixise ___ Python tracker

[issue33198] Build on Linux with --enable-optimizations fails

2018-05-15 Thread Florian Schulze
Florian Schulze added the comment: Due to the TLS changes on pypi.org the buildout I used before doesn't work anymore on Travis and I have now switched to pyenv. If I ever stumble over it again, I will open a new bug with more information. -- stage: ->

Re: Uploading on PyPI fail (solved)

2018-05-15 Thread Vincent Vande Vyvre
Le 15/05/18 à 12:05, Vincent Vande Vyvre a écrit : Hi, Trying to upgrade a package on PyPI, I get this error: $ python3 setup.py register sdist upload ... Submitting dist/py3exiv2-0.3.0.tar.gz to https://pypi.python.org/pypi Upload failed (308): Redirect to Primary Domain error: Upload failed

[issue33492] Updating the Evaluation order section to cover *expression in calls

2018-05-15 Thread Eric Lebigot
Change by Eric Lebigot : -- nosy: +Eric Lebigot ___ Python tracker ___ ___

[issue33514] async and await as keywords not mentioned in What’s New In Python 3.7

2018-05-15 Thread Miro Hrončok
Change by Miro Hrončok : -- keywords: +patch pull_requests: +6531 stage: -> patch review ___ Python tracker ___

Read data from .msg all files

2018-05-15 Thread mahesh d
import glob import win32com.client files = glob.glob('C:/Users/A-7993/Desktop/task11/sample emails/*.msg') for file in files: print(file) with open(file) as f: msg=f.read() print(msg) outlook =

[issue33517] dataclasses: Add the field type to Field repr

2018-05-15 Thread Eric V. Smith
New submission from Eric V. Smith : With the recent (and ongoing) change to string annotations, it's no longer obvious what the type of a field is (normal, ClassVar, or InitVar). I propose exposing the heretofore undocumented _field_type to the repr. Instead of writing it

[issue33517] dataclasses: Add the field type to Field repr

2018-05-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +6533 ___ Python tracker ___

[issue33517] dataclasses: Add the field type to Field repr

2018-05-15 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 01abc6ec3a61769c55ee86834a432fb97801d28f by Eric V. Smith in branch 'master': bpo-33517: dataclasses: Add the field type to Field repr (GH-6858) https://github.com/python/cpython/commit/01abc6ec3a61769c55ee86834a432fb97801d28f

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Serhiy. The proposed check would cripple the intended use of cumulative weights which is provided as a way to avoid the cost of rebuilding the weights on every call. FWIW, bisect() has a long history of

[issue32769] Add 'annotations' to the glossary

2018-05-15 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Yes, local annotations are important and should be mentioned (maybe even with an example). -- ___ Python tracker

[issue29640] _PyThreadState_Init and fork race leads to inconsistent key list

2018-05-15 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Petr, Do you continue this patch/issue? Thank you -- nosy: +matrixise ___ Python tracker ___

[issue33518] Add PEP to glossary

2018-05-15 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +6534 stage: -> patch review ___ Python tracker ___

[issue32769] Add 'annotations' to the glossary

2018-05-15 Thread Andrés Delfino
Andrés Delfino added the comment: Hopefully I address your comments with the last PR update. -- ___ Python tracker ___

Re: What's the rationale for b"..." in this example?

2018-05-15 Thread Chris Angelico
On Wed, May 16, 2018 at 1:14 AM, Skip Montanaro wrote: > Consider this: > bytes("abc", encoding="utf-8") > b'abc' > > Looks reasonable. Then consider this: > str(bytes("abc", encoding="utf-8")) > "b'abc'" > > Why is the b'...' bit still there? I suppose it's

[issue24318] Better documentaiton of profile-opt (and release builds in general?)

2018-05-15 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +6537 ___ Python tracker ___ ___

[issue33498] pathlib.Path wants an rmtree method

2018-05-15 Thread Aaron Hall
Aaron Hall added the comment: > What is wrong with just using shutil.rmtree()? 0. It's awkward to import just for demonstrations. 1. It's harder for new pythonists to discover. 2. A method provides discoverability in an object's namespace. 3. rmtree is a method of paths

[issue28167] remove platform.linux_distribution()

2018-05-15 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset e618e96581a711f2bc4f9bbcff6069bea15f0177 by Petr Viktorin in branch '3.6': bpo-28167: bump platform.linux_distribution removal to 3.8 (GH-6864) https://github.com/python/cpython/commit/e618e96581a711f2bc4f9bbcff6069bea15f0177

[issue33257] Race conditions in Tkinter with non-threaded Tcl

2018-05-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Mark, would you review or at least comment on PR 6444? Your comments in msg316669 on #33479 suggest that you have the requisite knowledge. -- nosy: +markroseman ___ Python tracker

[issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7

2018-05-15 Thread Eric Snow
Eric Snow added the comment: Yeah, I added an extra parameter. Since it's an internal API I didn't think anything of it. -- ___ Python tracker

[issue33522] Enable CI builds on Visual Studio Team Services

2018-05-15 Thread Steve Dower
New submission from Steve Dower : We have been provided with https://python.visualstudio.com/cpython and a measure of build machines to help us run continuous integration builds. The benefits are more reliable builds (especially Mac and Windows) and higher parallelism

[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2018-05-15 Thread Jason Fried
New submission from Jason Fried : At Facebook and Instagram we have large interconnected codebases without clear boundaries of ownership. As we move more and more services to utilize asyncio we are finding that once blocking (but fast) code paths, are now cropping up

Simplest way to clobber/replace one populated directory with another?

2018-05-15 Thread Travis Griggs
I have a directory structure that might look something like: Data Current A B C Previous A X In as simple/quick a step as possible, I want to rename Current as Previous including the contents and wiping out the

Re: What's the rationale for b"..." in this example?

2018-05-15 Thread Ben Finney
Skip Montanaro writes: > Consider this: > > >>> bytes("abc", encoding="utf-8") > b'abc' > > Looks reasonable. Then consider this: > > >>> str(bytes("abc", encoding="utf-8")) > "b'abc'" > > Why is the b'...' bit still there? Because the bytes object is asked for a text

Re: What's the rationale for b"..." in this example?

2018-05-15 Thread Serhiy Storchaka
15.05.18 18:14, Skip Montanaro пише: Consider this: bytes("abc", encoding="utf-8") b'abc' Looks reasonable. Then consider this: str(bytes("abc", encoding="utf-8")) "b'abc'" Why is the b'...' bit still there? I suppose it's because I didn't tell it explicitly how to decode the bytes

[issue33496] Accept Pathlib paths for sqlite file

2018-05-15 Thread John Reese
Change by John Reese : -- nosy: +jreese ___ Python tracker ___ ___ Python-bugs-list

[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread R. David Murray
R. David Murray added the comment: On the other hand, that section does reference the ABC directly, so I can see the point of your question. So I guess I'm not sure what the answer is...I don't think copy is an essential part of the ABC, but I'm not sure. --

[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2018-05-15 Thread Jason Fried
Change by Jason Fried : -- nosy: +lukasz.langa ___ Python tracker ___ ___

[issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7

2018-05-15 Thread STINNER Victor
STINNER Victor added the comment: Oh, I'm sorry, I misunderstood the issue. Changes in the *private* API must not be documented. In short, you must not use the private API :-) If you really have to use the private API, be prepared for incompatible changes in new Python

[issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold

2018-05-15 Thread R. David Murray
R. David Murray added the comment: Oh, interesting. I could argue that that's a missing feature in Python's slice handling. The value of text_space at that point is '+inf', and I obviously incorrectly assumed that slicing would treat that as if it were [:]. The

Re: object types, mutable or not?

2018-05-15 Thread Ben Finney
Mike McClain writes: > Many thanks to those teachers who responded. Thank you for asking the question in a way that allows the discussion :-) > I think I got it. > The variable is not the object just as the name is not the thing. Yes. The term “variable” is so

[issue28167] remove platform.linux_distribution()

2018-05-15 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset f4fdb619ddb5b00178c79c2b90adc45075b5f17d by Petr Viktorin (Miss Islington (bot)) in branch '3.7': bpo-28167: bump platform.linux_distribution removal to 3.8 (GH-6669) (GH-6862)

[issue33435] incorrect detection of information of some distributions

2018-05-15 Thread Petr Viktorin
Petr Viktorin added the comment: Python's deprecation process takes several years, but linux_distribution is actually nearing the end of it. It is planned to be removed. Your improvement is great, but at this point, it is more similar to adding a new feature to the

Re: object types, mutable or not?

2018-05-15 Thread Rhodri James
On 15/05/18 15:29, Mike McClain wrote: On Sun, May 13, 2018 at 07:10:11PM -0400, Richard Damon wrote: On 5/13/18 4:02 PM, Mike McClain wrote: I'm new to Python and OOP. Python en 2.7.14 Documentation The Python Language Reference 3. Data model 3.1. Objects, values and types An object's type

[issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold

2018-05-15 Thread radical164
New submission from radical164 : Python 3.6.5 has trouble on folding email messages: Traceback (most recent call last): File "emailtest.py", line 7, in policy.fold("Subject", msg["Subject"]) File "/usr/lib/python3.6/email/policy.py", line 183, in fold return

[issue19124] os.execv executes in background on Windows

2018-05-15 Thread Jakub Wilk
Change by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue33521] Optimize asyncio.isfuture by providing C implementation

2018-05-15 Thread Jimmy Lai
New submission from Jimmy Lai : asyncio.isfuture called whenever ensure_future is called. Providing C implementation to make it fast. -- components: asyncio messages: 316670 nosy: asvetlov, jimmylai, yselivanov priority: normal severity: normal status: open title:

[issue28167] remove platform.linux_distribution()

2018-05-15 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +6538 ___ Python tracker ___ ___

[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2018-05-15 Thread Jason Fried
Change by Jason Fried : -- keywords: +patch pull_requests: +6540 stage: -> patch review ___ Python tracker ___

  1   2   3   >