Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8822293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:04:13+00:00 2026-06-14T06:04:13+00:00

I am currently updating an input validation library from a year ago, and while

  • 0

I am currently updating an input validation library from a year ago, and while reviewing the IsEmpty() validator, I noticed that it was seeing strings with only spaces as NOT EMPTY, like so:

s = ' '

This is of course normal, as Python sees strings with spaces as containing value as opposed to a truly empty string that would evaluate to None.

My question is, can anyone think of a reason why I should not make a string with spaces evaluate to EMPTY for the purposes of my validation library?

Thoughts appreciated.

EDIT: I am updating this to clarify that this question was NOT INTENDED to cover a domain specific application. This library is open source and I am updating for the benefit of the community. Therefore, this question was more of a survey to hear out suggestions on how to implement this (in the manner of a library) to best serve Python developers and their validation needs. I have opted to include 2 methods to provide flexibility to consuming programs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:04:14+00:00Added an answer on June 14, 2026 at 6:04 am

    This is a domain-dependant question – it depends on each application.

    I would suggest having two functions, one which defaults one way, and the other which defaults the other, and each having a keyword argument to select the other behaviour.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working updating some legacy code that does not properly handle user input. The
I am currently updating a webpage that has some very simple data displayed in
I am currently in the process of updating many test sites on an old
I'm currently in progress of updating all sql queries to pdo where I will
I've currently run into a performance problem when updating properties on lots of dom
I've been tasked with updating a function which currently reads in a configuration file
Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
I have a python program that produces an error: def update_ranges(phonemelist) : updating the
I have an observable collection that is populated from a service. The UI is
Hey I'm having a big issue with my android App. I'm currently updating it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.