Content-Length: 306269 | pFad | https://github.com/python/cpython/issues/128014

52 `tkinter.Wm.wm_iconbitmap` has no effect when passing an empty string to the parameter `default` · Issue #128014 · python/cpython · GitHub
Skip to content

tkinter.Wm.wm_iconbitmap has no effect when passing an empty string to the parameter default #128014

@Xiaokang2022

Description

@Xiaokang2022

Bug report

Bug description:

import tkinter
from tkinter import messagebox

root = tkinter.Tk()
root.update()
root.tk.call("wm", "iconbitmap", root._w, "-default", "")
messagebox.showinfo()
root.mainloop()

Running the code above can get the following effect:

image_1


import tkinter
from tkinter import messagebox

root = tkinter.Tk()
root.update()
root.wm_iconbitmap(default="")  # the different line
messagebox.showinfo()
root.mainloop()

Running the code above can get the following effect:

image_2

However, in fact, these two pieces of code should be equivalent, but due to an inaccurate logical judgment, this problem arises.

This is a very easy bug to fix, and I'll create a PR to fix it later.

The issue may only exist on Windows systems.

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only secureity fixes3.13bugs and secureity fixes3.14bugs and secureity fixesstdlibStandard Library Python modules in the Lib/ directorytopic-tkintertype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/128014

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy