This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nalza001
Recipients nalza001, tim.peters
Date 2021-09-16.02:03:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631757838.99.0.213689232533.issue45180@roundup.psfhosted.org>
In-reply-to
Content
But when I turn off the "autojunk" feature for the following example, I get the wrong ratio of 0.5 instead of the correct ratio of 0.2 with autojunk enabled.

a="""
#include <iostream>
#include <string>
using namespace std;
int main() {
   
   string userPass;
   int sMaxIndex;
   char indivChar;
   int i;
   
   cin >> userPass;
   
   sMaxIndex = userPass.size() - 1;
   
   
   for (i = 0; i <= sMaxIndex; ++i) {
      
      indivChar = userPass.at(i);
      
      if (indivChar == 'i') {
         
         indivChar = '1';
         cout << indivChar;
         
      }
      else if (indivChar == 'a') {
         
         indivChar = '@';
         cout << indivChar;
         
      }
      else if (indivChar == 'm') {
         
         indivChar = 'M';
         cout << indivChar;
         
      }
      else if (indivChar == 'B') {
         
         indivChar = '8';
         cout << indivChar;
         
      }
      else if (indivChar == 's') {
         
         indivChar = '$';
         cout << indivChar;
         
      }
      else {
         
         cout << indivChar;
         
      }
      
   }
   
   cout << "!" << endl;
   
   return 0;
}
"""

b="""
#include <iostream>
#include <string>
using namespace std;
int main() {
   string ori;
   cin >> ori;
   for (int i = 0; i < ori.size(); i++){
      if (ori.at(i) == 'i')
         ori.at(i) = '1';
      if (ori.at(i) == 'a')
         ori.at(i) = '@';
      if (ori.at(i) == 'm')
         ori.at(i) = 'M';
      if (ori.at(i) == 'B')
         ori.at(i) = '8';
      if (ori.at(i) == 's')
         ori.at(i) = '$';
      }
   cout << ori << endl;

   return 0;
}
"""
History
Date User Action Args
2021-09-16 02:03:59nalza001setrecipients: + nalza001, tim.peters
2021-09-16 02:03:59nalza001setmessageid: <1631757838.99.0.213689232533.issue45180@roundup.psfhosted.org>
2021-09-16 02:03:58nalza001linkissue45180 messages
2021-09-16 02:03:58nalza001create