Eryk Sun <eryk...@gmail.com> added the comment:

PlaySound() is implemented by the C function winsound_PlaySound_impl() in 
"PC/winsound.c". To support pathlike objects, it could use `soundname = 
PyOS_FSPath(sound)`, and require soundname to be a Unicode string via 
PyUnicode_Check(soundname). Or it could more generically support any buffer or 
pathlike object via PyUnicode_FSDecoder(sound, &soundname). This call decodes 
byte strings using the filesystem encoding, which is UTF-8 unless legacy ANSI 
mode is enabled.

----------
nosy: +eryksun
stage:  -> needs patch
versions: +Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46905>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to